Java is not usually included in Linux. OpenJDK is great but sorry to say it doesn't seem to work on my net-banking website. I have complained but till the situation betters I have to use the JDK supplied by Sun. Which is a closed source option.
Installing Java on Linux is a bit different than on Windows. There is point and click option available on most of the newer Linux flavours for the OpenJDK. But for the Sun Java only commandline option is there. The command-line option is a quick way to do it cleanly. I have tried this on Fedora, Ubuntu. It should work on most.
This will create extract the required files and install the files in the folder /usr/java/jre1.6.0_29. The executable for java is present in the folder /usr/java/jre1.6.0_29/bin. It is possible to install multiple versions of java in your computer at the same time and use it as needed. It is possible with the help of alternatives command.
Enter to keep the current selection[+], or type selection number:
* shows the most appropriate choice, i.e. Open source Java ;-). Now you will have multiple Java installed and choice can be changed by alternatives --config javacommand. Most recently installed Java will be the lowest one and select it.
Installing Firefox Java plugin
This install also provides the latest java plugin for your favourite browser Firefox. Older plugin was named libjavaplugin.so or libjavaplugin_oji.so. The newer plugin is libnpjp2.so. Similar to the multiple versions of Java present in your computer you can have multiple versions of plugin installed and use whichever is appropriate for you. You install the plugin in a similar way with alternatives command.
In RPM based distros such as Fedora installation is simpler as the file jre-6u29-linux-i586-rpm.bin extracts RPM and installs the java at the above mentioned place /usr/java. Rest of the commands for configuring by alternatives remain the same.
These directions is for 32 bit Linux. I haven't tried 64 bit Linux as yet since I dont have a 64 bit computer, so any directions for that will be welcome. Or I will post it as soon as I get my hands on such a computer.