Wednesday, May 1, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 63903  / 1 Year ago, sat, january 7, 2023, 2:03:01

I'm using Ubuntu 10.10 and downloaded jdk7 from java.sun.com. That jdk is a compressed file and on extraction there I got all the files and folders of jdk1.7.0.



But now if I tries to compile a java program than there is an error that javac not found.

How could I set PATH of jdk1.7.0in to use javac everywhere?


More From » installation

 Answers
6

  1. Download the latest version of java from java.sun.com

  2. Extract the file in your home folder.

  3. Run the following commands in terminal



    sudo mkdir -p /usr/lib/java/



    sudo mv jdk1.7.0/ /usr/lib/java/


  4. Find the file profile in etc folder of FileSystem


  5. Edit in editor and write the line



    export PATH=/usr/lib/java/jdk1.7.0/bin:$PATH


  6. save it. You might need to restart your system to make these change.




You can check the current version using the following command javac -version


[#43306] Monday, January 9, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gliroopy

Total Points: 290
Total Questions: 115
Total Answers: 114

Location: Egypt
Member since Tue, May 3, 2022
2 Years ago
;