Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been trying to install Oracle Java 7 on Ubuntu 11.04. I was following the instructions given here

Once I followed all the steps ( to the letter ), I tried running

java -version

which gave the expected output. But running

javac -version

did not give the expected output. Instead I get the following error:

Error : Could not find libjava.so
Error : Could not find Java SE Runtime Environment

The environment variable PATH contains both /usr/local/java/jre/bin and /usr/local/java/jdk/bin, LD_LIBRARY_PATH points to /usr/local/lib which contains libjava.so which is currently owned by the user who I am running javac as. In addition, JAVA_HOME points to the jdk folder. Inspite of all this, javac is unable to find the libjava.so file. There are multiple solutions online but none seem to work for me. Even a direct run

/usr/locale/java/jdk/bin/javac -version

results in the same error.

Any help is hugely appreciated. Thanks

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

This might not be exact solution that you want, but could try this: If you install JDK by this method:


Linux Jdk installation

Adds PPA for JDK

sudo add-apt-repository ppa:webupd8team/java

Updates PPA

sudo apt-get update

Installs JDK

sudo apt-get install oracle-java7-installer
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.