我的代码在Eclipse中正常工作但是当我从可执行jar格式的eclipse或使用maven导出时,我收到以下错误:
完整错误:
java.io.IOException: Cannot run program "C:\myPrograms\jdk1.7.0_79\bin\java.exe" (in directory "src"): CreateProcess error=267, The directory name is invalid
at java.lang.ProcessBuilder.start(Unknown Source)
at TestAuomation.Jobs.execJob(Jobs.java:154)
at TestAuomation.Jobs$Build_JobParams.runJob(Jobs.java:67)
at TestAuomation.intelliPerf$BackgroundTask.doInBackground(intelliPerf.java:849)
at TestAuomation.intelliPerf$BackgroundTask.doInBackground(intelliPerf.java:845)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=267, The directory name is invalid
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
我可以从jar启动程序,但是在尝试执行调用java -jar的某些操作时遇到此错误....我在使用流程构建器的程序中运行此程序
请建议我做错了什么