This tutorial is going to show you how to install the latest version of Oracle Java Runtime Environment (JRE) on Ubuntu 13.10 manually. Yes, this tutorial is trying to guide you how to do it manually, no PPA. So, lets forget sudo apt-get install command for a moment. Java is an important tool or application for Linux and Windows. Many programs was built based on it and/or need Java to run properly.
To install Oracle Java on Ubuntu 13.10 manually, please follow these steps:
1. Download Java package for Linux. Go to http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html and select Java SE Runtime version match with your architecture. In this example, I am using Ubuntu 13.10 32 bit so I choose and download the Linux x86 tar.gz version.
2. After download, open Terminal and we are going to have some fun. Create new directory under /usr/, then move the downloaded file to the new directory and extract it there.
sudo mkdir /usr/java
sudo mv jre1-7u51-linux-i586.tar.gz
sudo tar -xvzf jre1-7u51-linux-i586.tar.gz
You will now have a new directory under /usr/java called jre1.7.0_51. All the Java files are stored in this folder.
At this point we are successfully created java directory under /usr and extract the Oracle Java installer file. Now we need to edit the file /etc/profile.
Now add the following lines to the bottom of the file
OK Now we need to tell the system that the new Oracle Java version is available. Execute this command
sudo update-alternatives –install “/usr/bin/java” “java” “/usr/java/jre1.7.0_51/bin/java” 1
Done. Now check if the new Java is installed correctly. This command will tell you
It should returned something like this:
java version “1.7.0_51”
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Server VM (build 24.51-b03, mixed mode)
OK now your Ubuntu is equipped with the latest version of Oracle Java Runtime Environment.