java:“无法访问jarfile ...” [英] java: "Unable to access jarfile ..."
问题描述
Newbee to java
Newbee to java
我已经下载了RoboMind( http:// robomind .net )并尝试让它在Linux Mint12上运行
知道Min12不是最新版本,我仍然希望它能够运行...
I have downloaded RoboMind (http://robomind.net) and try to make it run on a Linux Mint12 Knowing that Min12 is not the newest release, I still would like it to run...
当我使用包中的.sh文件时,我收到一个错误:
无法访问jarfile ...
When I use the .sh file that comes in the pack I get an error: "Unable to access jarfile ..."
如果我在相同的提示符下输入完全相同的命令,则在同一目录中,它可以工作:
if I type the exact same command at the same prompt, in the same directory, it works:
这里是来自commanline的复制粘贴:
here is a copy paste from the commanline:
magnus @ martin-HP-625~ / Downloads / RoboMind $ ./robomind.sh
magnus@martin-HP-625 ~/Downloads/RoboMind $ ./robomind.sh
无法访问jarfile RoboMind.jar
Unable to access jarfile RoboMind.jar
magnus @ martin-HP-625~ / Downloads / RoboMind $ cat ./robomind.sh
magnus@martin-HP-625 ~/Downloads/RoboMind $ cat ./robomind.sh
java -jar -Djava.ext.dirs = lib -Dsun.java2d.ddscale = true -Dsun.java2d.noddraw = true RoboMind.jar
java -jar -Djava.ext.dirs=lib -Dsun.java2d.ddscale=true -Dsun.java2d.noddraw=true RoboMind.jar
magnus @ martin-HP-625~ / Downloads / RoboMind $ java -jar -Djava.ext.dirs = lib -Dsun.java2d.ddscale = true -Dsun.java2d.noddraw = true RoboMind.jar
magnus@martin-HP-625 ~/Downloads/RoboMind $ java -jar -Djava.ext.dirs=lib -Dsun.java2d.ddscale=true -Dsun.java2d.noddraw=true RoboMind.jar
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1076)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1053)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at robo.RoboMind.startGui(RoboMind.java:168) ... <snip>
现在可行.. 。?
区别是什么?
我在其他帖子中建议使用javapath等,但没有任何结果与上述情况有任何区别。
Whats the difference? I messed around with javapath etc. as suggested in other posts, but nothing makes any difference to the situation illustrated above.
为什么不能.sh脚本在提示符完全相同的命令没有问题时找到.jar文件?
Why can't the .sh script find the .jar file when the exact same command at the prompt have no problems?
最好的问候
Martin
Best regards Martin
推荐答案
我会给你解决方案,我会让你发现为什么。
I'll give you the "solution", and I will let you discover "why".
刚推出:
# dos2unix robomind.sh
..之后它会起作用。如果您没有安装dos2unix,请 apt-get install dos2unix
..after then it will work. If you do not have dos2unix installed, apt-get install dos2unix
这篇关于java:“无法访问jarfile ...”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!