Results 1 to 2 of 2
Thread: Jbutton to destroy process
- 04-01-2011, 04:55 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 8
- Rep Power
- 0
Jbutton to destroy process
i have a thread running 3 process like below...
what i want with my jbutton(cancel) is to destroy all process that have started???Java Code:Process firstRun = null; Runtime r = Runtime.getRuntime(); firstRun = r.exec(startRunner1.runnerStarted.toString()); Process secondRun = null; Runtime r = Runtime.getRuntime(); secondRun = r.exec(startRunner2.runner2Started.toString());
firstRun.destroy(); works fine
but i wont know what process it is up to when i click the cancel button, i would like to know what is running then kill it..... i.e ????.destroy();
the dirty way is i assume to list all processes and destroy them all 1 by 1
- 04-19-2011, 06:58 PM #2
Member
- Join Date
- Mar 2011
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
destroy an applet inside a frame
By afraidofdark in forum Advanced JavaReplies: 1Last Post: 03-28-2010, 05:41 PM -
Destroy object
By anjanesh in forum New To JavaReplies: 11Last Post: 01-02-2010, 07:25 PM -
[SOLVED] How to destroy a process when a button is clicked?
By pranav13 in forum AWT / SwingReplies: 11Last Post: 02-13-2009, 12:52 PM -
Behaviour of stop() and destroy()-methods
By Zamppa in forum Java AppletsReplies: 0Last Post: 02-10-2009, 09:50 AM -
Applets (init, start, stop, destroy)
By Java Tip in forum Java TipReplies: 0Last Post: 12-12-2007, 10:57 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks