Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

http://www.horstmann.com/bigj/help/compiler/tutorial.

html

Appendix 1: Installing the JDK on Windows


1. Go to http://java.sun.com/j2se and look for a Download link.

2. On the download page, you may see several versions of the JDK. Pick the latest one (In 2006, it is called JDK 5.0.) 3. You will see a page with numerous download choices. You want the Java Development Kit (JDK) without the NetBeans environment, and without the Enterprise Edition. Click on the Download link. (In 2005, the marketing geniuses at Sun started labeling the most current version "Update n", such as JDK 5.0 Update 6. That's the one you want. It is the full JDK, not an update to an existing installation.) 4. Select the Windows installer (either the online or offline version are fine). Download and run the installation program. 5. When the installation program starts, it gives you a chance to change the installation location. As always, you should not accept the default in theProgram Files directory. Instead, click on the Change button. Carefully remove Program Files\Java\ from the installation directory, so that the installation directory looks similar to c:\jdk1.5.0\. Make a note of the exact name of the directory. 6. Continue with the installation. After the JDK has been installed, you are invited to install other features (a runtime environment and additional fonts). You can safely skip these features by clicking the Cancel button. 7. When the installation is finished, you need to restart the computer (hey, it's Windows). 8. Open a command shell and type in the command
c:\jdk1.5.0\bin\java -version

However, be sure to change the first part jdk1.5.0 to match the exact name of the download directory. You should get a message that describes the version of the Java installation. If you get that message, close the shell window and go on to

the next step. Otherwise, carefully check the name of the installation directory.
9. Now comes the part that everyone hates. Click on the Start button and

launch the Control Panel. Select the Performance and Maintenance category. Then select the System dialog. In the dialog, click on the Advanced tab:

Now click on the EnvironmentVariables button.

In the System variables list, select the Path variable and click the Edit button.

Carefully click on the Variable value field so that the entire path is no longer highlighted. If you accidentally erase it, hit Cancel right away and try again. Move the cursor to the beginning of the line. Add an entry to the beginning of the field. The entry has the form
c:\JDK directory name\bin;

Be sure you enter the exact name of the JDK directory and follow it by \bin; (a backslash, the word bin and a semicolon). Click Ok three times.

You might also like