> How to stop a Application using the command
> mand "javaw" on Windows Platform?
If you don't have methods to do just that, then you have only one choice. Task Manager, and kill the job.
You have to catch an event if you want to close your window by clicking on that X at the right top corner. Here's the code:
class MyFrame extends JFrame {
MyFrame() {
addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
);
// ... adding components, whatever
pack();
setVisible(true);
}
}
Hope I answered your real question.
Best Regards,
Ivan
You have to take care of it in your back-end program. For example, check periodically if a file exists or not. When the file appears, stop your program. If your program doesn't take care of it, then nothing will, and it will run forever. In this case, the only remaining option is using the Task Manager of the windows, or the "kill" command in unix-likes.