Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Shut down computer?

Thread view: 
Benjamin - 28 Apr 2007 03:19 GMT
Is it possible to shutdown a user's computer from within Java?
Mr Bit Fly - 28 Apr 2007 04:23 GMT
> Is it possible to shutdown a user's computer from within Java?

YES !

You only need to localize the SO command to shutdown your computer and
execute it from java !!.

if you are trying to shutdown the computer from an applet  this needs
to be signed

Regards
Greg R. Broderick - 28 Apr 2007 13:32 GMT
Benjamin <musiccomposition@gmail.com> wrote in news:1177726764.813057.78220
@e65g2000hsc.googlegroups.com:

> Is it possible to shutdown a user's computer from within Java?

On which of the many platforms that Java supports?  Linux?  Unix?  Mac?  
Windows?  Java is a platform-independent language -- you write your code once
and it runs on every platform.  Shutting down the OS/computer is a platform-
dependent operation -- it is done differently on each platform.  To
accomplish this, you would need to determine the operating system using Java
system properties and call C/C++ code via JNI to actually do the system
shutdown.

Cheers!

Signature

---------------------------------------------------------------------
Greg R. Broderick            gregb+usenet200612@blackholio.dyndns.org

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------

Mr Bit Fly - 28 Apr 2007 19:37 GMT
Well...

im not an orthodox or a conservative about Java, speaking loud about
his platform independency.

You can doit in java and it counts !!

The Power of java is about posibilities, not about the fool
conservative myths.

On Apr 28, 7:32 am, "Greg R. Broderick" <gregb
+usenet200...@blackholio.dyndns.org> wrote:
> Benjamin <musiccomposit...@gmail.com> wrote in news:1177726764.813057.78220
> @e65g2000hsc.googlegroups.com:
[quoted text clipped - 18 lines]
> Q. What is the most annoying thing on Usenet?
> ---------------------------------------------------------------------
Joshua Cranmer - 28 Apr 2007 21:48 GMT
> Well...
>
[quoted text clipped - 15 lines]
>> Q. What is the most annoying thing on Usenet?
>> ---------------------------------------------------------------------

First off, I left that signature in there to emphasize an irony.

Second, I disagree with your reasoning. The point of Java was to try to
create a platform-independent model. This isn't about conservatism, it's
about trying to save others headaches when they try to run your program
from less common system.

Finally, you *cannot* do it in Java per se. The closest one can get is
to hack in a Runtime.exec call or use JNI; JNI requires use of another
language, and a Runtime.exec call at best assumes the presence of other
functions.
Greg R. Broderick - 29 Apr 2007 11:47 GMT
Mr Bit Fly <mrbitfly@gmail.com> wrote in news:1177785426.204592.168750
@u30g2000hsc.googlegroups.com:

> You can doit in java and it counts !!

Please demonstrate (with real Java code) how one would shut down an IBM
system running AIX, using only java.

Cheers!

Signature

---------------------------------------------------------------------
Greg R. Broderick            gregb+usenet200612@blackholio.dyndns.org

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------

Benjamin - 29 Apr 2007 03:24 GMT
On Apr 28, 7:32 am, "Greg R. Broderick" <gregb
+usenet200...@blackholio.dyndns.org> wrote:
> Benjamin <musiccomposit...@gmail.com> wrote in news:1177726764.813057.78220
> @e65g2000hsc.googlegroups.com:
[quoted text clipped - 8 lines]
> system properties and call C/C++ code via JNI to actually do the system
> shutdown.
I was thinking something cross platform. Maybe something in the API?

> Cheers!
>
[quoted text clipped - 5 lines]
> Q. What is the most annoying thing on Usenet?
> ---------------------------------------------------------------------


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.