我正在尝试将 MPJ Express 集成到 Ubuntu 13.04 的 eclipse(Kepler) 中
.bashrc 中定义的环境变量如下:
export JAVA_HOME=/home/soumya/Work/jdk1.7.0_25
export PATH=$PATH:/home/soumya/Work/jdk1.7.0_25/bin
export MPJ_HOME=/home/soumya/InstalledSoftwares/mpj-v0_38
export PATH=$PATH:$MPJ_HOME/bin
问题 1: 当我启动 Eclipse 时出现错误:
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/home/soumya/Work/eclipse/jre/bin/java java
in your current PATH
这是通过复制 Eclipse 文件夹中的 jre 文件夹来解决的。所以现在 Eclipse 开始了。
问题 2: 我似乎无法运行多核程序。在我的 Java 项目的运行配置中,我完成了以下操作:
- 将变量设置
MPJ_HOME
为/home/soumya/InstalledSoftwares/mpj-v0_38
- 将环境变量设置
MPJ_HOME
为${MPJ_HOME}
- 将 VM 参数设置为
-jar ${MPJ_HOME}/lib/starter.jar
但是当我运行程序时,我收到以下错误:
MPJ Express (0.38) is started in the multicore configuration
java.io.IOException: Cannot run program "java" (in directory "/home/soumya/Work/EclipseWorkspace/SoftwareArchitectureProject/MulticoreDebuggerDemo"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at runtime.starter.MulticoreDaemon.startNewProcess(MulticoreDaemon.java:268)
at runtime.starter.MulticoreDaemon.<init>(MulticoreDaemon.java:109)
at runtime.starter.MPJRun.<init>(MPJRun.java:146)
at runtime.starter.MPJRun.main(MPJRun.java:964)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 4 more