try {
Process p =Runtime.getRuntime().exec("startNetworkServer.bat",null, new File(System.getProperty("user.dir") + "/bin/"));
p.waitFor();
} catch (IOException ex) {
Logger.getLogger(MainClass.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(MainClass.class.getName()).log(Level.SEVERE, null, ex);
}
运行此代码后和异常...
java.io.IOException:
Cannot run program "startNetworkServer.bat" (in directory "C:\Users\..\Documents\NetBeansProjects\dir\bin"):
CreateProcess error=2, System cant find directory`
请帮我解决问题:)