First you have to get it. Visit http://java.sun.com/j2se/1.5.0/download.jsp.
Accept the license agreement and download the SDK. Make sure that as you follow the instructions below, you change the file names as necessary for the exact distribution you get.
Just run the executable installer.
Open a command prompt. If you can type “java -version” and see something meaningful, you're good to go.
If not, read on.
Get the RPM binary for Linux. You have to give the j2sdk* file permission to execute.
$ chmod a+x j2sdk-1_5_0-linux-i586-rpm.bin
Now execute the file.
Agree to the license.
Change to super user:
$su root Password: ******
To install it if a previous version of ...