Install Oracle Jdk 7u71 On Ubuntu Linux 14_04
Install Oracle JDK 7u71 on Ubuntu Linux 14.04
Akbar S. Ahmed | Jan 19, 2015

Step-by-step instructions

Please follow the instructions to installer a newer version of the JDK. Install the Oracle JDK 7 update 75 on Ubuntu Linux 14.04.

As a developer, there are a number of packages that you may use that require the JDK.

For Node.js developers the WebStorm IDE requires Java. For data engineers, many big data technologies require Java including Cassandra and Hadoop. For mobile developers the Android Studio requires a JDK.

Download the current JDK

Create a directory for the locally installed JDK.

mkdir -p ~/opt/packages

As of the date of this post, the current JDK version is Java Platform (JDK) 7u71.

  1. Open a browser to
  2. Click Accept License Agreement.
  3. Click jdk-7u71-linux-x64.tar.gz.
  4. Download the JDK to the ~/opt/packages directory.


Open a terminal, then enter the following commands:

cd ~/opt/packages

gzip -dc jdk-7u71-linux-x64.tar.gz | tar xf -

The jvm directory is used to organize all JDK/JVM versions in a single parent directory.

sudo mkdir /usr/lib/jvm

sudo mv jdk1.7.0_71 /usr/lib/jvm

Next, add the new JDK to the alternatives list. If you see multiple JDK/JVM versions listed in the output from any of the commands below, then select JDK 1.7.0 u71 as your primary JDK.

sudo update-alternatives --install "/usr/bin/java" "java" \
    "/usr/lib/jvm/jdk1.7.0_71/bin/java" 1

sudo update-alternatives --install "/usr/bin/javac" "javac" \
    "/usr/lib/jvm/jdk1.7.0_71/bin/javac" 1

sudo update-alternatives --install "/usr/bin/javaws" "javaws" \
    "/usr/lib/jvm/jdk1.7.0_71/bin/javaws" 1

sudo update-alternatives --config java

As a final step, let’s test each of the commands to ensure everything is setup correctly.

java -version

# Expected output:
# java version "1.7.0_71"
# Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
# Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

javac -version

# Expected output: javac 1.7.0_71

javaws -version

# Expected output: Java(TM) Web Start 1.7.0_71, which is followed by a long usage message.

That’s it, the JDK 1.7.0 update 71 is installed.

Subscribe to our newsletter

Contact Information


We specialize in helping professional developers, like you, expand your skill set. Our courses are focused on enabling you to learn everything necessary to use a new technology in a live, production application.


All courses are made with love in
Palo Alto, CA.

Subscribe to our newsletter