• support@answerspoint.com

How to install Open JDK (Java developement kit) on Ubuntu Linux?

1927

How to install Open JDK (Java developement kit) on Ubuntu Linux?

1Answer


0

a. Open Terminal or press Ctrl+Alt+T

b. Run the following command in Terminal:

          sudo apt-get install openjdk-8-jdk                                    

c. Type commandline as below...

          apt-cache search jdk                            

          (Note: openjdk-8-jdk is symbolically used here. You can choose the JDK version as per your requirement.)

d. For "JAVA_HOME" (Environment Variable) type command as shown below, in "Terminal" using your installation path...

         export JAVA_HOME=/usr/lib/jvm/java-8-openjdk                                    

         (Note: "/usr/lib/jvm/java-8-openjdk" is symbolically used here just for demostration. You should use your path as per your installation.)                            

e. For "PATH" (Environment Variable) type command as shown below, in "Terminal" using your installation path...

         export PATH=$PATH:/usr/lib/jvm/java-8-openjdk/bin                                    

         (Note: "/usr/lib/jvm/java-8-openjdk" is symbolically used here just for demostration. You should use your path as per your installation.)                            

 f. Check for "open jdk" installation, just type command in "Terminal" as shown below

         javac -version

  • answered 6 years ago
  • Community  wiki

Your Answer

    Facebook Share        
       
  • asked 6 years ago
  • viewed 1927 times
  • active 6 years ago

Best Rated Questions