public class exe_runner {
public static void main(String[] args) {
try {
Runtime.getRuntime().exec("calc.exe");
} catch (Exception e) {
e.printStackTrace();
}
}
}
attention -:
"calce.exe" is a file that in windows directory its also can be run with run command in wiondows.
how ever when you use other different exe's you have to provide the full path to the *.exe file and remember short cuts
cant be run with this because its extent ion is .lnk so it cant be run.
and "need for speed "game exe's dose not support idont know why , some times all other game programs too
you have to check them your self.
other program exe 's running greatly in this code. :)
and this is how to terminate the process ,
Process pp = Runtime.getRuntime().exec("calc.exe");
pp.destroy();
done :)))
use net beans or familiar IDE to make things easy :):)