This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Closing Applications Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Closing Applications" Watch "Closing Applications" New topic
Author

Closing Applications

james wilson
Greenhorn

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
James
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
child.destroy();
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing Applications
 
Similar Threads
Logfile from different classes
running tomcat
from servlet wants to close the application
J2EE/J2SE JMS message
Scheduler application architecture