You have to extract the rpm from the .bin file first.
chmod a+x j2sdk-1_4_0-linux-i386-rpm.bin
The just install the rpm:
rpm -Uvh j2sdk-1_4_0-fcs-linux-i386.rpm
I put this in another thread on the board, but I changed the way I was doing it. The so you don't have to use the full path to java:
Create the file /etc/profile.d/java.sh
Copy this to into the file:
#Set JAVA_HOME and path
if ! echo $PATH | /bin/grep -q "$JAVA_HOME/bin" ; then
If you install Java in a different place just change JAVA_HOME. Make sure the java.sh has the right permissions.
chown root.root /etc/profile.d/java.sh
chmod 0755 /etc/profile.d/java.sh
For the changes to take effect, logout and login or you can use: source /etc/profile
If you did it right:
$ echo $PATH
$ env | grep JAVA_HOME
You can just add the same to ~/.bash_profile I prefer to use /etc/profile.d because you only have to add it once and it is setup for all users.