Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I finished some steps of installation of jdk-7u1 in Ubuntu 1.11 until below steps. after that step the terminal tells that there is nothing to configure. after that when I run a java file the terminal said that usr/lib/jvm/java : no such a file or directory.

 sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7
share|improve this question

it is better if you try to install JAVA from Ubuntu Software Center after that you can run java programs also follow these links

share|improve this answer

Since , You Are Telling That You Installed The Java Correctly , So You Should Try to run your Java File as "#user@root" user or simply root user.

If this doesn't work then you should try to run java from Java Directory .

user@root:~ $ /usr/lib/jvm/

share|improve this answer

Your Answer


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.