Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

How to shutdown windows 98/2000 from java program

 
yoursrini vasan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
I want to check out the user should not close my login screen , if he try to close it means the os should restart or shutdown (try for win98/2000) only. Pls help me now
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Report post to moderator
Did you think about the unsaved work, the user might have, which you're going to damage by shutting down?

Shall this be a kind of virus?
How to prohibit the user using the task-manager to kill your app?

Java isn't made for such ugly and unresponsible behaviour.
You need at least some close-to-the os code - native c/c++ or Runtime.exec - to call.

But it's unresponsible.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
I can imagine that there may well be sincere security concerns for what yoursrini vasan is trying to do.

As suggested, I don't think you'll be able to figure out a strictly Java-based solution. For help figuring out any Windows-specific system calls, I suggest that you mosey on over to the General Computing forum and ask a question. For help figuring out using JNI to make any Windows-specific system call, mosey on over to the Other Java APIs forum.
 
    Bookmark Topic Watch Topic
  • New Topic