本文介绍了java.io.FileNotFoundException:null\conf\wrapper.conf(系统找不到指定的路径)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用本教程, text: 步骤1,2,3 视频: 步骤0:00至3:29



参考文件





示例代码(从教程)

  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(我是进程,+ rank +>总<+
size +>进程。
MPI.Finalize();
}
}

我已经包括了mpi和mpj jar文件来自(根据教程步骤)



然后我设置运行路径配置(按照教程步骤)

  -jar $ {MPJ_HOME} /lib/starter.jar 

我也尝试过相同的命令,但是在最后添加了-np 4(根据教程步骤)

  -jar $ {MPJ_HOME} /lib/starter.jar -np 4 

VM参数





MPJ_HOME变量





MPJ Express输出

  MPerry Express(0.38)以多核配置启动
我正在处理< 3>总计< 4>处理
我正在处理< 3>总计< 4>处理
我正在处理< 3>总计< 4>处理
我正在处理< 3>总计< 4>处理

一旦我完成了我尝试通过Eclipse执行它的所有内容,但是我收到这些错误:(



编译器错误

  java.io.FileNotFoundException:null\conf\wrapper.conf(系统找不到指定的路径)
在java.io.FileInputStream.open(本机方法)
在java.io.FileInputStream 。< init>(未知源)
在java.io.FileInputStream。< init>(未知源)
在runtime.starter.MPJRun.getPortFromWrapper(MPJRun.java:807)
在runtime.starter.MPJRun。< init>(MPJRun.java:68)
在runtime.starter.MPJRun.main(MPJRun.java:964)
/ pre>

Wrapper.conf位置





我对我为什么收到这些错误有点困惑..我打算做别的事吗?在教程中没有告诉我?为了得到这个工作?



我做错了什么?如何解决这个JRE错误?关于mpj express上的文件conf\wrapper.conf?我想我缺少一些东西,但是我已经读了这么多资源,一遍又一遍地跟着教程,但是我仍然收到了wrapper.conf的FileNotFoundException。



我发现了一些资源(没有回答FileNotFoundException问题)。









如果有人有关于如何修复FileNotFoundException的建议我非常感谢!谢谢!

解决方案

在首选项菜单中去运行/ - >字符串替换。把变量放在那里你在这个上下文中没有处理环境变量。环境变量将以完全平台的方式出现,您将看到%MJP_HOME%,而在* nix上,它将看起来像 $ MJP_HOME 在这种情况下,你使用Eclipse的字符串替换机制



你可以阅读它


I've been using this tutorial http://mpjexpress.blogspot.co.nz/2010/05/executing-and-debugging-mpj-express.html, text: steps 1,2,3 and video: steps between 0:00 to 3:29

Referenced files

build path http://iforce.co.nz/i/e3kg0k2h.w0c.png

Sample Code (Copy paste from the tutorial)

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 <"+rank+"> of total <"+
size+"> processes.");
MPI.Finalize();
}
}

And I've included the mpi and mpj jar file from http://en.sourceforge.jp/projects/sfnet_mpjexpress/downloads/releases/mpj-v0_38.zip/ (as per tutorial step)

Then I set the run path configuration (as per tutorial step)

-jar ${MPJ_HOME}/lib/starter.jar

I also tried the same command but with -np 4 appended to the end (as per tutorial step)

-jar ${MPJ_HOME}/lib/starter.jar -np 4

VM arguments

mpi run config http://iforce.co.nz/i/pfpigbiv.l4h.png

MPJ_HOME variable

mpi var http://iforce.co.nz/i/rzl4e0ff.pfi.png

MPJ Express Output

 MPJ Express (0.38) is started in the multicore configuration
 I am process <3> of total <4> processes
 I am process <3> of total <4> processes
 I am process <3> of total <4> processes
 I am process <3> of total <4> processes

Once I finished setting everything I try to execute it via Eclipse, but I'm getting these errors :(

Compiler Error

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.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at runtime.starter.MPJRun.getPortFromWrapper(MPJRun.java:807)
at runtime.starter.MPJRun.<init>(MPJRun.java:68)
at runtime.starter.MPJRun.main(MPJRun.java:964)

Wrapper.conf location

wrapper loc http://iforce.co.nz/i/g02jjzgk.g5n.png

I'm slightly confused on why I'm getting these errors.. am I meant to do something else ? that the tutorial isn't telling me? in order to get this to work?

what am I doing wrong? how can I fix this JRE error? regarding the file "conf\wrapper.conf" on mpj express? I think I'm missing something but I've read so many resources and followed the tutorial over and over... but I'm still receiving the FileNotFoundException for wrapper.conf.

Some resources I've found (none answer the FileNotFoundException problem).

If anyone has any advice on how to fix the FileNotFoundException I'd greatly appreciate it thanks!

解决方案

In the preferences menu go to run/debug --> String Substitution. Put your variable there. You are not dealing with an environment variable in this context. Environment variables will appear in totally platform specific way on windows you'll see %MJP_HOME% and on *nix it will look like $MJP_HOME in this case you are use Eclipse's string substitution mechanism

you can read about it here

这篇关于java.io.FileNotFoundException:null\conf\wrapper.conf(系统找不到指定的路径)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 02:52