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...

24 Steps 1 min read Advanced

Step-by-Step Guide

  1. 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"

    ,
  2. Step 2: then type: sudo lsb.release –a to check linux Distributor and version;

  3. Step 3: Check your Ubuntu Linux operating system architecture is 32-bit or 64-bit

  4. Step 4: open up a terminal and run the following command below.

  5. Step 5: Download the correct Java Development Kits compressed binaries for your system

  6. Step 6: Switch to the Root mode and Create a folder to install Java Development Kits

  7. Step 7: Type: SU - ROOT

  8. Step 8: and Type :MKDIR -P /USR/LOCAL/JAVA1 (Most of us we work at user mode

  9. Step 9: but if we want to install some software in our computer

  10. Step 10: we must switch into the root mode.

  11. Step 11: Copy the Oracle Java binaries into the /usr/local/java directory.

  12. Step 12: Check the copy action is success

  13. Step 13: Type  : su – root;Type  : Cd /usr/local/java;Type  : ls –a

  14. Step 14: Unpack the compressed Java binaries

  15. Step 15: in the directory /usr/local/java

  16. 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

  17. Step 17: Double check the unpack is success.

  18. 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

  19. 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

  20. Step 20: Save the profile and quit

  21. Step 21: Set the JDK is the default

  22. Step 22: Inform your Ubuntu Linux system where your Oracle Java JDK is located.

  23. Step 23: Reload your system wide PATH /etc/profile by typing the following command:Type  : source /etc/profile

  24. 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

K

Katherine Mendoza

Dedicated to helping readers learn new skills in practical skills and beyond.

93 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: