java.io.FileNotFoundException:null \ conf \ wrapper.conf(系统找不到指定的路径)
我一直在使用这个教程http://mpjexpress.blogspot.co.nz/2010/05/executing-and-debugging-mpj-express.html,text:steps 1,2,3和video: 0之间的步骤: 00至3:29
参考文件
建立路径http://sofzh.miximages.com/eclipse/e3kg0k2h.w0c.png
示例代码(从教程中复制粘贴)
import mpi.*; public class HelloEclipseWorld { vpublic static void main(String[] args) throws Exception { MPI.Init(args) ; int rank = MPI.COMM_WORLD.Rank(); int size = MPI.COMM_WORLD.Size(); System.out.println("I am process of total processes."); MPI.Finalize(); } }
我已经在http://en.sourceforge.jp/projects/sfnet_mpjexpress/downloads/releases/mpj-v0_38.zip/中包含了mpi和mpj jar文件(根据教程步骤)
然后我设置运行路径配置(根据教程步骤)
-jar ${MPJ_HOME}/lib/starter.jar
我也尝试了相同的命令,但最后添加了-np 4(根据教程步骤)
-jar ${MPJ_HOME}/lib/starter.jar -np 4
VM参数
mpi run config http://sofzh.miximages.com/eclipse/pfpigbiv.l4h.png
MPJ_HOME变量
mpi var http://sofzh.miximages.com/eclipse/rzl4e0ff.pfi.png
MPJ Express输出
MPJ Express (0.38) is started in the multicore configuration I am process of total processes I am process of total processes I am process of total processes I am process of total processes
一旦我完成设置,我尝试通过Eclipse执行它,但我收到这些错误:(
编译错误
java.io.FileNotFoundException: null\conf\wrapper.conf (The system cannot find the path specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(Unknown Source) at java.io.FileInputStream.(Unknown Source) at runtime.starter.MPJRun.getPortFromWrapper(MPJRun.java:807) at runtime.starter.MPJRun.(MPJRun.java:68) at runtime.starter.MPJRun.main(MPJRun.java:964)
Wrapper.conf位置
wrapper loc http://sofzh.miximages.com/eclipse/g02jjzgk.g5n.png
我有点困惑为什么我得到这些错误..我是不是想做别的事情? 该教程没有告诉我? 为了让这个工作?
我究竟做错了什么? 我该如何解决这个JRE错误? 关于mpj express上的文件“conf \ wrapper.conf”? 我想我错过了一些东西,但我已经阅读了这么多资源并且一遍又一遍地遵循教程……但是我仍然收到了wrapper.conf的FileNotFoundException。
我找到的一些资源(没有回答FileNotFoundException问题)。
- Mpj java docs
- Mpj windows指南
- vub mpj
如果有人对如何修复FileNotFoundException有任何建议,我将非常感谢谢谢!
在首选项菜单中,转到运行/调试 – >字符串替换。 把变量放在那里。 您没有在此上下文中处理环境变量。 环境变量将以完全平台特定的方式出现在Windows上你会看到%MJP_HOME%
和on * nix它看起来像$MJP_HOME
在这种情况下你使用Eclipse的字符串替换机制
你可以在这里阅读它
解决MPJ错误
Error: Could not find or load main class runtime.starter.MulticoreStarter
为了让它工作..转到Run Config – > Class Path,然后在“Bootstrap”下单击“Add External JARS”,只包含来自mpj的/ lib /文件夹中的所有内容,这将使mpj运行,但我不确定关于如何解决编译器问题。
寻址编译器
java.io.FileNotFoundException:null \ conf \ wrapper.conf(系统找不到指定的路径)java.io.FileInputStream.open(本机方法)java.io.FileInputStream。(未知来源)java.io.运行时的run.starter.MPJRun.getPortFromWrapper(MPJRun.java:807)上的FileInputStream。(未知来源)。在runtime.starter.MPJRun.main(MPJRun.java:964)的运行时。(MPJRun.java:68)。
我的讲师告诉我,我错过了Enviroment Variable“MPJ_HOME”,Run Config – > Enviroment Variables – > New“MPJ_HOME”(使用为VM Arguments创建的变量)