Saturday, June 22, 2013

javaws complaining java no such file or directory.

Just got my Ubuntu 12.01 installed. I have fed up with Fedora as it was just so sensitive because whenever there is a lib updated, it failed to boot up so easily. Switching back to Ubuntu, denotes this distro is more user friendly than others. At least it is less sensitive than Fedora. Anyhow there are some issue when I'm trying to launch a JNLP program using javaws in Ubuntu. I got the following error message when I issuing the javaws command:

/usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java: No such file or directory

Well, according to the bug report, there is some problem with the /usr/bin/javaws file. Type this command head /usr/bin/javaws, following output should be seen:


At line 3 and line 9, notice that the path was pointing to java-7-openjdk-amd64, when I dive into that path, I can see the java file was missing and the content of the directory wasn't as complete as in java-6-openjdk-amd64. So they suggest to change it to use java-6-openjdk-amd64 with following steps:

- Press Alt+F2
- enter the following (without paranthesis): "gksudo gedit /usr/bin/javaws"
- enter your password
- Change the "7" in the first line to a "6"
- Save and quit

It is not yet a perfect solution, this workaround will break whenever there is an update on the package. The correct workaround should be this way:

- sudo update-alternatives --config javaws

and then choose the number in front of /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws.


imbenzene said...

God Bless you.


ultrandroid said...

Thank you so much dude!!!