Please visit this website: http://java.sun.com/j2se/1.4.2/download.html and please read the following instructions before you proceed.
Make sure that you DO NOT download the J2EE version.
Do not confuse the SDK with JRE. You need the SDK version.
Once you visit the website mentioned above in your web browser, please perform the following steps.
Look for the heading titled J2SE v 1.4.2_09 SDK includes the JVM technology as shown in Figure 3.1, “J2SE downloads page”. As mentioned earlier, make sure you download the SDK and not the JRE version.
Click on the link titled Download J2SE SDK and it will load another webpage in your web browser.
In this webpage, you will notice the word Required with two radio buttons Accept and Decline underneath it as shown in Figure 3.2, “J2SE downloads page (Accept terms)”.
Check the Accept radio button and it will refresh the webpage that you are currently viewing.
Once the webpage is refreshed, look for the heading titled Windows Platform - Java(TM) 2 SDK, Standard Edition 1.4.2_09 as shown in Figure 3.3, “J2SE downloads page (Choose installation)”.
Choose the Windows installation, Multi-language option by clicking on it.
Note: If you would like to download the installation executable and copy it to a machine that is disconnected from the network, choose the Offline installation.
A dialog window pops up with the option of either running the J2SE 1.4.2 installer executable or saving it to disk to perform the installation at a later time. Choose the nature of installation that you prefer and follow the instructions that the installer provides, to complete the installation.
Setting JAVA_HOME. Once you install the Java 2 SDK onto a desired location, you need to add a system variable with the name JAVA_HOME to your system's environment variables. Follow these steps to do the same.
Right-click on the My Computer icon on your desktop and click on properties. You should see a window similar to the one below. Click on the Advanced tab as highlighted.
Click on the Environment Variables as shown below.
Click on the New button as shown below.
Enter JAVA_HOME for the Variable name and the path of your Java 2 SDK installation as the Variable value. For example, c:\j2sdk1.4.2_09.
Click the OK button and it will take you back to the previous screen. Click OK again in the windows which you encountered previously to ensure that the changes are saved in the system properties.