If a user executes foo.exe on his computer, is there a way to terminate foo.exe using a Java program?
Edit: To clear things up, I am talking about a process that was not created by the Java app.
If a user executes foo.exe on his computer, is there a way to terminate foo.exe using a Java program?
Edit: To clear things up, I am talking about a process that was not created by the Java app.
Looks like you are on Windows .
The command to kill a process is: taskill or tskill depending your Windows version .
tskill yourprocessname
executed by java
Runtime.getRuntime().exec(new String[]{"tskill", "foo"});