无法运行程序“startNetworkServer.bat”

时间:2014-12-04 12:51:08

标签: java database ioexception

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`

请帮我解决问题:)

0 个答案:

没有答案