String path = "D:/res/report/Release/";File dir = new File(path);Runtime.getRuntime().exec("D:/res/report/Release/WordReportPrint.exe" + args,null,dir);
[解决办法] 程序执行是否依赖什么环境变量或路径(文件夹之类的),如果是,写成一个bat,再在java里调用,如果不是,直接 Process p = Runtime.getRuntime().exec("D:/res/report/Release/WordReportPrint.exe " + args); p.waitFor();