Results 1 to 2 of 2
  1. #1
    peterhammond is offline Member
    Join Date
    Mar 2011
    Posts
    8
    Rep Power
    0

    Default Jbutton to destroy process

    i have a thread running 3 process like below...

    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());
    what i want with my jbutton(cancel) is to destroy all process that have started???

    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

  2. #2
    peterhammond is offline Member
    Join Date
    Mar 2011
    Posts
    8
    Rep Power
    0

    Default

    called them all the same name runProcess then killed the runProcess.destroy().

Similar Threads

  1. destroy an applet inside a frame
    By afraidofdark in forum Advanced Java
    Replies: 1
    Last Post: 03-28-2010, 06:41 PM
  2. Destroy object
    By anjanesh in forum New To Java
    Replies: 11
    Last Post: 01-02-2010, 08:25 PM
  3. Replies: 11
    Last Post: 02-13-2009, 01:52 PM
  4. Behaviour of stop() and destroy()-methods
    By Zamppa in forum Java Applets
    Replies: 0
    Last Post: 02-10-2009, 10:50 AM
  5. Applets (init, start, stop, destroy)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-12-2007, 11:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •