We will be using release 1.6 of the Java Standard Edition (Java SE) development kit. This page tells you how to install this programming environment on your home computer. There are two parts to this installation. The first part is installing the Java development kit (JDK) on your computer and the second part is installing a text editor that makes it easier to use the JDK. The first part of the installation is decribed below in this page.
- Step 1:
- Install Sun's JDK 1.6. Use the link at the end of this paragraph to go to Sun's download page. (you want to download the first item from the list of downloads). That will take you to a page where you can download an installation program. To install the JDK, follow the Sun's installation instructions.
Sun's JDK 1.6 download page
- Step 2:
- If you want to, you can test your JDK installation. Use the Start Menu to start up a "Command Prompt" window. At the command prompt, enter the following command.
C:\Program Files\Java\jdk1.6.0_02\bin\javac
You should get a "usage message" back from the Java compiler. Now download this Hello.java file. At the command prompt, use the cd command to move to the directory where you stored the file Hello.java . Compile Hello.java with the following command.
C:\Program Files\Java\jdk1.6.0_02\bin\javac Hello.java
After the program compiles, run the program with the next command.
C:\Program Files\Java\jdk1.6.0_02\bin\java Hello
- Step 2.5 (Optional):
- In the last step we used the "full path name",
C:\Program Files\Java\jdk1.6.0_02\bin\javac , at the command prompt for the Java compiler javac (and similarly for the Java virtual machine, java ). If you want to work with Java from the command prompt, using full path names can be inconvenient. So you may want to set the Windows PATH variable to include the Java JDK. How to do this is explained in Step 4 of Sun's installation instructions. If you do not want to use the command prompt, then this step is not needed (and setting the PATH variable is not needed for any of the following steps).
- Step 3:
- The JDK does not come with any documentation. If you want the HTML version of the documentation, then you need to install that separately. But the HTML version of the documentation is large (about 180MB installed) and not easy to use. In the next step, I will show you a better version of the documentation to install. But if you want the HTML version, read on.
The HTML version of the documentation comes in a zip file called jdk-6-doc.zip . Download this file from the link at the end of this paragraph. Unzip the zip file into a temporary directory. The temporary directory will contain a sub-directory called docs . Move the docs directory to be a sub-directoy of the directory C:\Program Files\Java\jdk1.6.0_02 which was created by the installer in Step 1 (the last three digits in this directory name are the "version number" of the JDK, and this number might increase over time).
Java SE 6 Documentation download (sixth item down)
- Step 4:
- When learning Java, it is important to learn how to use Java's documentation. So now we will install an easy to use HTMLHelp version of the Java documentation. Open your
C:\Program Files\Java\jdk1.6.0_02\ directory and create a subdirectory called docs-win . Download the HTMLHelp version of the JDK 1.6 documentation using the link at the end of this paragraph. (That link takes you to a page in France where the person who maintains these help files resides.) Download the item called "J2SE 6 documentation", near the bottom of the page. After you have downloaded the zip file, unzip it into a temporary directory. Then move the contents of the temporary directory to the C:\Program Files\Java\jdk1.6.0_02\docs-win\ directory that you just created.
Franck Allimant - HTMLHelp JDK 1.6 Documentation
|
|