How to install Oracle Java Runtime on Ubuntu 13.10 manually

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.

java-download

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
cd /usr/java
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.

nano /etc/profile

Now add the following lines to the bottom of the file

JAVA_HOME=/usr/java/jre1.7.0_51
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

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

java -version

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.

Admin

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.