Step 1: Open the application → Accessories → Terminal
Step 2: Enter the command line as shown below ...
sudo apt-get install openjdk-6-jdk
Step 3: Enter the command line as shown below ...
apt-cache search jdk
(Note: openjdk-6-jdk is symbolically used here, you can choose the jdk version according to your requirement.)
How to set "Environment Variables" for "Open jdk" on Ubuntu (Linux)?
Step 4: For a command of type "JAVA_HOME" (Environment Variable), as shown below, in the "Terminal" using the installation path ...
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
(Note: "/ usr / lib / jvm / java-6-openjdk" is symbolically used here just for demonstration, you should use your path as per your installation.)
Step 5: For a command of type "PATH" (Environment Variable), as shown below, in the "Terminal" using the installation path ...
export PATH=/usr/lib/jvm/java-6-openjdk/bin
(Note: "/ usr / lib / jvm / java-6-openjdk" is symbolically used here just for demonstration, you should use your path as per your installation.)
Step 6: Verify the installation of "open jdk", just enter the command in the "Terminal" as shown below java
user1896728
source share