Thursday, February 20, 2014

How to install "Open Jdk" (java developement kit) in Ubuntu(Linux)? 


Step 1: Open Applicaction>> Accessories>> Terminal 

Step 2: Type commandline as below
... sudo apt-get install openjdk-7-jdk 

Step 3: Type commandline as below
... apt-cache search jdk
 (Note: openjdk-7-jdk is symbolically used here you can choose jdk version as per your requirment.) 

How to set "Environment Variables" for "Open jdk" in Ubuntu(Linux)?

 Step 4: For "JAVA_HOME" (Environment Variable) type command as shown below, in "Terminal" using your installation path

... export JAVA_HOME=/usr/lib/jvm/java-7-openjdk

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

 Step 5: For "PATH" (Environment Variable) type command as shown below, in "Terminal" using your installation path

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

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

 Step 6: Check for "open jdk" installation, just type command in "Terminal" as shown below javac