how to kill a process from a java application ?
1 posts in topic
Flat View  Flat View

Posted By:   hacene_khellaf
Posted On:   Tuesday, October 9, 2001 11:33 AM

i'm using the Runtime.exec() to launch a process from a java application,

the problem is that it keeps stuck in the task manager list, and i have to kill it manually to get my results.

is there anyway to use the Runtime.exec() properly to evoid this problem,

or to kill the process "manually" from my application

i've seen similar questions somewhere but no answer to the problem.

i'm using windows 2000 as a system.

thanks for any help

Re: how to kill a process from a java application ?

Posted By:   Luigi_Viggiano  
Posted On:   Wednesday, October 10, 2001 05:30 AM


try this example code:

Process p =Runtime.getRuntime().exec("notepad.exe");
System.out.println("press enter to kill...");

About | Sitemap | Contact