You are on page 1of 2

JAVA Installation on Linux (Fedora)

1). Download the JDK latest version from the http://cds.sun.com/is-


bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u23-
linux-i586.bin?
BundledLineItemUUID=K.6J_hCy4C4AAAEtWblKPCyZ&OrderID=346J_hCypQ8AAAEtS7lKPCyZ&Product
ID=QhOJ_hCw.dUAAAEsFIMcKluK&FileName=/jdk-6u23-linux-i586.bin

2). Download the JRE latest version from the

http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-
Site/en_US/-/USD/VerifyItem-Start/jre-6u23-linux-i586.bin?
BundledLineItemUUID=5tKJ_hCyD2wAAAEtkUpKPCyc&OrderID=yv.J_hCyBsEAAAEteEpKPCyc&Product
ID=IDWJ_hCw_XAAAAEsU8wcKluy&FileName=/jre-6u23-linux-i586.bin

3). If not getting check in the in this link


http://www.oracle.com/technetwork/java/javase/downloads/index.html

4). JDK Installation:-

1. Download and check the download file size. 


You can download to any directory that you can write to.
This bundle can be installed by anyone (not only root users), in any location that the user can
write to. However, only the root user can displace the system version of the Java platform
supplied by Linux.
2. Make sure that execute permissions are set

Copy the installer into the folder where you want to install

EX:- /usr/ashok/java/jdk installer

Giveexcutable permissions to the installer file by using the following command.

Goto /usr/ashok/java folder and execute the following command.

Chmod a+x installerfile

EX:-  chmod a+x jdk-6u <version>-linux-i586.bin

3. Change directory to the location where you would like the files to be installed.
The next step installs the JDK into the current directory.

4. Run the self-extracting binary.


Execute the downloaded file, prepended by the path to it. For example, if the file is in the
current directory, prepend it with " ./" (necessary if " ." is not in the PATH environment
variable):

% ./jdk-6u <version>-linux-i586.bin
The binary code license is displayed, and you are prompted to agree to its terms.
The JDK files are installed in a directory called jdk1.6.0_<version> in the current directory.
Follow this link to see its directory structure. The JDK documentation is a separate download.

Go to file-->etc-->bashrc(set last line)


export PATH=$PATH:/opt/java/jdk1.6.0.23/bin
export CLASSPATH=/opt/java/jdk1.6.0.23/lib/tools.jar:/opt/jre/jre1.6.0_23/lib/rt.jar:./
export JAVA_HOME=/opt/java/jdk1.6.0_23

You might also like