开发者

Cannot run Scala through ProcessBuilder

开发者 https://www.devze.com 2023-03-26 08:30 出处:网络
When I try to run processBuilder = new ProcessBuild开发者_开发百科er(\"scala\", \"-classpath\", CLASSPATH, CLASSNAME);

When I try to run

processBuilder = new ProcessBuild开发者_开发百科er("scala", "-classpath", CLASSPATH, CLASSNAME);
process = processBuilder.start;
process.waitFor;

within an Scala application on Eclipse Helios IDE, it yields the

java.io.IOException: Cannot run program "scala": CreateProcess error=2, The system cannot find the file specified.

I've already configured the Windows system environment variable Path and scala runs OK on Windows command line. I've also added the variable Path into Eclipse run configuration.


I suspect the problem here is that you need to pass scala.bat, not scala. To narrow down the problem, you should try running other programs, to see what you can or cannot run.

0

精彩评论

暂无评论...
验证码 换一张
取 消