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 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
add comment

2 Answers

it is better if you try to install JAVA from Ubuntu Software Center after that you can run java programs also follow these links http://brunoreis.com/tech/intalling-java-ubuntu-natty/ http://www.liberiangeek.net/2012/04/install-oracle-java-jdk-7-in-ubuntu-12-04-precise-pangolin/ http://www.shinephp.com/install-jdk-7-on-ubuntu/

share|improve this answer
add comment

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