Videos
If both install and work for you, it doesn't matter which one you choose. both formats accomplish the same thing, and result in the same software being installed.
Another option in Ubuntu is using apt-get install, which is very simple, and automates the process.
I would recommend using apt-get install, it's cleaner.
Try to run it using sh itself, i.e
sh jdk-6u24-linux-i586-rpm.bin
Please make sure you are doing correct.
To install the Linux RPM (self-extracting) file Follow these instructions:
Become the root user by running the su command and entering the super-user password. At the terminal: Type:
suEnter the root password.
Change to the directory in which you want to install. Type:
cd <directory>For example, to install the software in the /usr/java/ directory, Type:
cd /usr/javaNote about root access: 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 Java in your home directory or a subdirectory for which you have write permissions.
Change the permission of the file you downloaded to be executable. Type:
chmod a+x jre-6u<version>-linux-i586-rpm.binStart the installation process. Type:
./jre-6u<version>-linux-i586-rpm.binThe license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
The installation file creates and runs the file jre-6-linux-i586.rpm in the current directory.
RPM unpacking completes
Verify that the jre1.6.0_ sub-directory is listed under the current directory. Type:
lsVerify the installation filename
Also refer: http://www.java.com/en/download/help/linux_install.xml#rpm