Error could not find libjava.so when running java binary

I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:

sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
11

1 Answer

Try rebooting your computer after installing it and try again.

Or you could have a problem similar to this one:

One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like