Documentation Contents
Java Platform, Standard Edition Installation Guide
Contents    Previous    Next

6 JDK Installation for Linux Platforms

This page describes JDK for Linux system requirements and gives installation instructions for several JDK-Linux combinations.

This page contains these topics:

See "JDK 8 and JRE 8 Installation Start Here" for general information about installing JDK 8 and JRE 8.

For information on enhancements to JDK 8 that relate to the installer, see "Installer Enhancements in JDK 8".

System Requirements

See http://www.oracle.com/technetwork/java/javase/certconfig-2095354.html for information about supported platforms, operating systems, and browsers.

On a 64-bit system, you can download either the 64-bit or the 32-bit version of the Java platform. However, if you are using a 32-bit browser and you want to use the plugin, then you need to install the 32-bit version of the Java platform. To determine which version of Firefox you are running, launch the application, and select the menu item Help -> About Mozilla Firefox. At the bottom of the window is a version string line that contains either "Linux i686" (32-bit) or "Linux x86_64" (64-bit). To setup the Java plugin, see "Manual Installation and Registration of Java Plugin for Linux".

JDK 8 Installation Instructions

This topic describes:

Installation Instructions Notation and Files

For instructions containing the notation version, substitute the appropriate JDK update version number. For example, if you are installing update JDK 8 update release 2, the following string representing the name of the bundle:

jdk-8uversion-linux-i586.tar.gz

becomes:

jdk-8u2-linux-i586.tar.gz

Note that, as in the preceding example, the version number is sometimes preceded with the letter u, for example, 8u2, and sometimes it is preceded with an underbar, for example, jdk1.8.0_02.

The following table lists the options and instructions for downloading the JDK 8 release on a Linux platform.

Download File and Instructions Architecture Who Can Install
jdk-8uversion-linux-x64.tar.gz
"Installation of the 64-bit JDK on Linux Platforms"
64-bit anyone
jdk-8uversion-linux-i586.tar.gz
"Installation of the 32-bit JDK on Linux Platforms"
32-bit anyone
jdk-8uversion-linux-x64.rpm
"Installation of the 64-bit JDK on RPM-based Linux Platforms"
64-bit RPM-based Linux root
jdk-8uversion-linux-i586.rpm
"Installation of the 32-bit JDK on RPM-based Linux Platforms"
32-bit RPM-based Linux root

Installation can be performed using either of the following:

  • Installation of Oracle Linux JDK using archive binaries (.tar.gz) allows you to install a private version of the JDK for the current user into any location, without affecting other JDK installations. However, it may involve manual steps to get some of the features to work (for example, the -version:release option of the java command, which allows you to specify the release to be used to run the specified class, requires the correct path to the JDK release under /usr/jdk).

  • Installation of Oracle Linux JDK using RPM packages allows you to perform a system-wide installation of the JDK for all users, and requires root access. RPM-based Linux platforms are based on Red Hat and SuSE.


Note:

When you download and install the Java Development Kit (JDK), the associated Java Runtime Environment (JRE) is also installed.

JDK 7u6 and later releases include JavaFX SDK (version 2.2 or later). The JavaFX SDK and Runtime are installed and integrated into the standard JDK directory structure.

For information about how to work with JavaFX, see http://docs.oracle.com/javase/8/javase-clienttechnologies.htm.

Installation of the 64-bit JDK on Linux Platforms

This procedure installs the Java Development Kit (JDK) for 64-bit Linux, using an archive binary file (.tar.gz).

These instructions use the following file:

jdk-8uversion-linux-x64.tar.gz
  1. Download the file.

    Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JDK into the system location.

  2. Change directory to the location where you would like the JDK to be installed, then move the .tar.gz archive binary to the current directory.

  3. Unpack the tarball and install the JDK.

    % tar zxvf jdk-8uversion-linux-x64.tar.gz
    

    The Java Development Kit files are installed in a directory called jdk1.8.0_version in the current directory.

  4. Delete the .tar.gz file if you want to save disk space.

Installation of the 64-bit JDK on RPM-based Linux Platforms

This procedure installs the Java Development Kit (JDK) for 64-bit RPM-based Linux platforms, such as Red Hat and SuSE, using an RPM binary file (.rpm) in the system location. You must be root to perform this installation.

These instructions use the following file:

jdk-8uversion-linux-x64.rpm
  1. Download the file.

    Before the file can be downloaded, you must accept the license agreement.

  2. Become root by running su and entering the super-user password.

  3. Uninstall any earlier installations of the JDK packages.

    # rpm -e package_name
    
  4. Install the package.

    # rpm -ivh jdk-8uversion-linux-x64.rpm
    

    To upgrade a package:

    # rpm -Uvh jdk-8uversion-linux-x64.rpm
    
  5. Delete the .rpm file if you want to save disk space.

  6. Exit the root shell. No need to reboot.

Starting with version 8u40, the JDK installation is integrated with the alternatives framework and after installation, the alternatives framework is updated to reflect the binaries from the recently installed JDK. Java commands such as java, javac, javadoc, and javap can be invoked from the command line.

Using the java -version command, users can confirm the default (recently installed) JDK version.

In addition, users can now check which specific RPM package provides the java files:

rpm -q --whatprovides java

Installation of the 32-bit JDK on Linux Platforms

This procedure installs the Java Development Kit (JDK) for 32-bit Linux, using an archive binary file (.tar.gz).

These instructions use the following file:

jdk-8uversion-linux-i586.tar.gz
  1. Download the file.

    Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JDK into the system location.

  2. Change directory to the location where you would like the JDK to be installed, then move the .tar.gz archive binary to the current directory.

  3. Unpack the tarball and install the JDK.

    % tar zxvf jdk-8uversion-linux-i586.tar.gz
    

    The Java Development Kit files are installed in a directory called jdk1.8.0_version in the current directory.

  4. Delete the .tar.gz file if you want to save disk space.

Installation of the 32-bit JDK on RPM-based Linux Platforms

This procedure installs the Java Development Kit (JDK) for 32-bit RPM-based Linux platforms, such as Red Hat and SuSE, using an RPM binary file (.rpm) in the system location. You must be root to perform this installation.

These instructions use the following file:

jdk-8uversion-linux-i586.rpm
  1. Download the file.

    Before the file can be downloaded, you must accept the license agreement.

  2. Become root by running su and entering the super-user password.

  3. 3. Uninstall any earlier installations of the JDK packages.

    # rpm -e package_name
    
  4. Install the package.

    # rpm -ivh jdk-8uversion-linux-i586.rpm
    

    To upgrade a package:

    # rpm -Uvh jdk-8uversion-linux-i586.rpm
    
  5. Exit the root shell. No need to reboot.

  6. 5. Delete the .rpm file if you want to save disk space.

Starting with version 8u40, the JDK installation is integrated with the alternatives framework and after installation, the alternatives framework is updated to reflect the binaries from the recently installed JDK. Java commands such as java, javac, javadoc, and javap can be invoked from the command line.

Using the java -version command, users can confirm the default (recently installed) JDK version.

In addition, users can now check which specific RPM package provides the java files:

rpm -q --whatprovides java

General Installation Notes

This topic describes general installation topics.

Root Access

Installing the software automatically creates a directory called jdk1.8.0_version. Note that if you choose to install the Java SE Runtime Environment into system-wide location such as /usr/jdk, you must first become root to gain the necessary permissions. If you do not have root access, simply install the Java SE Runtime Environment into your home directory, or a subdirectory that you have permission to write to.

Overwriting Files

If you install the software in a directory that contains a subdirectory named jdk1.8.0_version, the new software overwrites files of the same name in that jdk1.8.0_version directory. Please be careful to rename the old directory if it contains files you would like to keep.

System Preferences

By default, the installation script configures the system such that the backing store for system preferences is created inside the JDK's installation directory. If the JDK is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines.

See http://docs.oracle.com/javase/8/docs/technotes/guides/preferences/index.html for more information about preferences in the Java platform.

Contents    Previous    Next

Oracle and/or its affiliates Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.
Contact Us