public void call(){
Runtime r = Runtime.getRuntime() ;
Process p = null ;
try{
p = r.exec("notepad");//修改为你的a.exe的绝对路径
//p.waitFor() ; //注释她可以在记事本关闭前让浏览器完成
}catch( Exception e ){
System.out.println("exception when run notedpad.");
}
public class TestCallC {
public TestCallC() {
}
public void TestCallC1()
{
try{
String command = "cmd.exe /c start c:/Program Files/Apache Group/Tomcat 4.1/webapps/ROOT/jxyh/a.exe ";
Process child = Runtime.getRuntime().exec(command);
}
catch(IOException e)
{
;
}
--------
TestCallC.class文件内容如下
---------
// JBuilder API Decompiler stub source generated from class file
// 2004-3-23
// -- implementation of methods is not available