How to Install the JAVA Development Kits Onto Ubuntu
Open a terminal window by typing "terminal",then type: sudo lsb.release –a to check linux Distributor and version; , Check your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command...
Step-by-Step Guide
-
Step 1: Open a terminal window by typing "terminal"
Type : file /sbin/init ,, Generally, when we type the command SU – root into the terminal, the system password is required to enter) , In most cases, the Oracle Java binaries are downloaded to: /home/"your_user_name"/Downloads.32-bit Oracle Java on 32-bit Ubuntu Linux installation instructions:
Type : su
- wen;Type : cd ~/Downloads;Type : sudo cp
-r jdk-7u45-linux-i586.tar.gz /usr/local/java;Type : sudo cp
-r jre-7u45-linux-i586.tar.gz /usr/local/java ,,, At this point, you should have one uncompressed binary directory in /usr/local/java for the Java JDK/JR:
Type : ls –al ,,, Type : sudo update-alternatives
--install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/jre/bin/java"
, -
Step 2: then type: sudo lsb.release –a to check linux Distributor and version;
-
Step 3: Check your Ubuntu Linux operating system architecture is 32-bit or 64-bit
-
Step 4: open up a terminal and run the following command below.
-
Step 5: Download the correct Java Development Kits compressed binaries for your system
-
Step 6: Switch to the Root mode and Create a folder to install Java Development Kits
-
Step 7: Type: SU - ROOT
-
Step 8: and Type :MKDIR -P /USR/LOCAL/JAVA1 (Most of us we work at user mode
-
Step 9: but if we want to install some software in our computer
-
Step 10: we must switch into the root mode.
-
Step 11: Copy the Oracle Java binaries into the /usr/local/java directory.
-
Step 12: Check the copy action is success
-
Step 13: Type : su – root;Type : Cd /usr/local/java;Type : ls –a
-
Step 14: Unpack the compressed Java binaries
-
Step 15: in the directory /usr/local/java
-
Step 16: 32-bit Oracle Java on 32-bit Ubuntu Linux installation instructions:Type : sudo tar xvzf jdk-7u45-linux-i586.tar.gz;Type : sudo tar xvzf jre-7u45-linux-i586.tar.gz
-
Step 17: Double check the unpack is success.
-
Step 18: Edit the system PATH file /etc/profile and add the following system variables to your system path: Type : sudo gedit /etc/profile Scroll down to the end of the file using your arrow keys and add the following lines below to the end of your /etc/profile file:If you are installing the JDK then
-
Step 19: Type: JAVA_HOME=/usr/local/java/jdk1.7.0_45; #* Type:PATH=$PATH:$JAVA_HOME/bin Type:$JRE_HOME/bin Type:export JAVA_HOME;Type:export PATH
-
Step 20: Save the profile and quit
-
Step 21: Set the JDK is the default
-
Step 22: Inform your Ubuntu Linux system where your Oracle Java JDK is located.
-
Step 23: Reload your system wide PATH /etc/profile by typing the following command:Type : source /etc/profile
-
Step 24: Test to see if Java JDK was installed correctly on your system.Type :java – version;Type : Javac – version
Detailed Guide
Type : file /sbin/init ,, Generally, when we type the command SU – root into the terminal, the system password is required to enter) , In most cases, the Oracle Java binaries are downloaded to: /home/"your_user_name"/Downloads.32-bit Oracle Java on 32-bit Ubuntu Linux installation instructions:
Type : su
- wen;Type : cd ~/Downloads;Type : sudo cp
-r jdk-7u45-linux-i586.tar.gz /usr/local/java;Type : sudo cp
-r jre-7u45-linux-i586.tar.gz /usr/local/java ,,, At this point, you should have one uncompressed binary directory in /usr/local/java for the Java JDK/JR:
Type : ls –al ,,, Type : sudo update-alternatives
--install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/jre/bin/java"
,
About the Author
Katherine Mendoza
Dedicated to helping readers learn new skills in practical skills and beyond.
Rate This Guide
How helpful was this guide? Click to rate: