Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes Closing Applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Closing Applications" Watch "Closing Applications" New topic

Closing Applications

james wilson

Joined: Nov 17, 2001
Posts: 15
I currently use the follownig code to open a browser from my application;
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("c:\\Program Files\\Internet Explorer\\IEXPLORE.EXE");
What I want to do is also to be able to close this appliation from my Java application, is this possible?
To take this a step further, is it possible to close any other application that is running, even if you don't know what is running?
Thanks in advance
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
The API documentation seems to say that after
Process child=Runtime.getRuntime().exec(command);
you could
subject: Closing Applications
It's not a secret anymore!