Get the Offline Java installer here
Download Java software from Sun Microsystems
If you need Java 1.5 instead of java 1.6, then install
Java 1.5 (take the JRE) but always use the offline installer where possible.
At least with Java 1.6, issues can occur where you have previous versions of Java installed so java 1.6 won't work properly or at all. In those cases it's best to remove all versions of java using the add/remove programs control panel & reinstall java.