Martin
Martin

Reputation: 391

java: "Unable to access jarfile ..."

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

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?

Upvotes: 2

Views: 5786

Answers (1)

guido
guido

Reputation: 19214

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

Upvotes: 2

Related Questions