Shut down computer?

Discussion in 'Java' started by Benjamin, Apr 28, 2007.

  1. Benjamin

    Benjamin Guest

    Is it possible to shutdown a user's computer from within Java?
     
    Benjamin, Apr 28, 2007
    #1
    1. Advertising

  2. Benjamin

    Mr Bit Fly Guest

    On Apr 27, 9:19 pm, Benjamin <> wrote:
    > 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
     
    Mr Bit Fly, Apr 28, 2007
    #2
    1. Advertising

  3. Benjamin <> 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!

    --
    ---------------------------------------------------------------------
    Greg R. Broderick

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
     
    Greg R. Broderick, Apr 28, 2007
    #3
  4. Benjamin

    Mr Bit Fly Guest

    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
    > wrote:
    > Benjamin <> 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!
    >
    > --
    > ---------------------------------------------------------------------
    > Greg R. Broderick
    >
    > A. Top posters.
    > Q. What is the most annoying thing on Usenet?
    > ---------------------------------------------------------------------
     
    Mr Bit Fly, Apr 28, 2007
    #4
  5. Mr Bit Fly wrote:
    > 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
    > > wrote:
    >> --
    >> ---------------------------------------------------------------------
    >> Greg R. Broderick
    >>
    >> A. Top posters.
    >> 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.
     
    Joshua Cranmer, Apr 28, 2007
    #5
  6. Benjamin

    Benjamin Guest

    On Apr 28, 7:32 am, "Greg R. Broderick" <gregb
    > wrote:
    > Benjamin <> 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.

    I was thinking something cross platform. Maybe something in the API?
    >
    > Cheers!
    >
    > --
    > ---------------------------------------------------------------------
    > Greg R. Broderick
    >
    > A. Top posters.
    > Q. What is the most annoying thing on Usenet?
    > ---------------------------------------------------------------------
     
    Benjamin, Apr 29, 2007
    #6
  7. Mr Bit Fly <> 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!

    --
    ---------------------------------------------------------------------
    Greg R. Broderick

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
     
    Greg R. Broderick, Apr 29, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anders Both

    Shut down of asp.net process.

    Anders Both, Jan 11, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    649
    Hermit Dave
    Jan 13, 2004
  2. Michael Persaud

    Shut Down Machine

    Michael Persaud, Jan 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    508
    George Ter-Saakov
    Jan 22, 2004
  3. Bruce W.1
    Replies:
    3
    Views:
    420
    Hans Kesting
    Jan 27, 2004
  4. Stephen
    Replies:
    0
    Views:
    343
    Stephen
    Feb 3, 2006
  5. Steve
    Replies:
    0
    Views:
    479
    Steve
    Jan 31, 2006
Loading...

Share This Page