java to jarfile,java:“无法访问jarfile ...”

Newbee to java

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...

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:

here is a copy paste from the commanline:

magnus@martin-HP-625 ~/Downloads/RoboMind $ ./robomind.sh

Unable to access jarfile RoboMind.jar

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

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) ...

Now it works ... ?

Whats the difference?

I messed around with javapath etc. as suggested in other posts, but nothing makes any difference to the situation illustrated above.

Why can't the .sh script find the .jar file when the exact same command at the prompt have no problems?

Best regards

Martin

解决方案

I'll give you the "solution", and I will let you discover "why".

Just launch:

# dos2unix robomind.sh

..after then it will work. If you do not have dos2unix installed, apt-get install dos2unix

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值