Steps
- Download the file (In my example : jdk-1_5_0_22-linux-i586-rpm.bin) on this location http://java.sun.com/javase/downloads/5u22/jdk
- In graphic mode (X windows), double click on it and answers all questions
- At the end, java must be installed in this directory : /usr/java/jdk1.5.0_22
- Change the permission of the file you downloaded to be executable.
[root@oel11g tmp]# chmod a+x jdk-1_5_0_22-linux-i586-rpm.bin
- Verify the changement
[root@oel11g tmp]# ls -l|grep jdk-1_5_0_22-linux-i586-rpm.bin
-rwxr-xr-x 1 root root 47930001 Oct 16 2009 jdk-1_5_0_22-linux-i586-rpm.bin
- Change to the directory in which you want to install
[root@oel11g tmp]# mkdir /usr/local/java/
[root@oel11g tmp]# cd /usr/local/java/
You can not choose the installation directory with a Linux RPM (self-extracting) file. It will always be installed in /usr/java
To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory for which you have write permissions.
- Move the file from its location to the installation location
[root@oel11g java]# mv /tmp/jdk-1_5_0_22-linux-i586-rpm.bin ./
- Run the self-extracting binary Type:
./jdk-1_5_0_22-linux-i586-rpm.bin
- Answer to the question. Done !
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP ([email protected]).
inflating: jdk-1_5_0_22-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
Done.
Firefox Configuration in graphic environment
- Go to the firefox directory : /usr/lib/firefox-3.0.5
- Open the plugins directory (create it if necessary)
- Right click, open the console and perform this command (to make links between files)
[root@oel11g plugins]# ln -s /usr/java/jdk1.5.0_22/jre/plugin/i386/ns7/libjavaplugin_oji.so
- Restart Firefox and Test your Java