Installing JDK in Linux
Installing JDK in Linux
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).
JDK 7 Installation Instructions
Note: For any text on this page containing the following notation, you must substitute the
appropriate JDK update version number for the notation.
<version>
For example, if you are installing update JDK 7 update release 1, the following string
representing the name of the bundle:
jdk-7u<version>-linux-i586.tar.gz
would become:
jdk-7u1-linux-i586.tar.gz
Note that, as in the preceding example, the <version> number is sometimes preceded
with the letter u, for example, 7u2, and sometimes it is preceded with an underbar, for example,
jdk1.7.0_02.
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. Move the
.tar.gz archive binary to the current directory.
3. Unpack the tarball and install the JDK.
% tar zxvf jdk-7u<version>-linux-x64.tar.gz
The Java Development Kit files are installed in a directory called jdk1.7.0_<version> in the
current directory.
4. Delete the .tar.gz file if you want to save disk space.
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>
To upgrade a package:
# rpm -Uvh jdk-7u<version>-linux-x64.rpm
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. Move the
.tar.gz archive binary to the current directory.
3. Unpack the tarball and install the JDK.
% tar zxvf jdk-7u<version>-linux-i586.tar.gz
The Java Development Kit files are installed in a directory called jdk1.7.0_<version> in the
current directory.
4. Delete the .tar.gz file if you want to save disk space.
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>
To upgrade a package:
# rpm -Uvh jdk-7u<version>-linux-i586.rpm
Root Access
Installing the software automatically creates a directory called jdk1.7.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.