Download Installing The Java Developer`s Kit (JDK) and Java Runtime

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Installing The Java Developer’s Kit (JDK)
and Java Runtime Environment (JRE).
Java is a non-platform specific program that requires specialized
installation to be easily accessible from a Windows Environment.
You will first install the files from Sun’s Java Website, and then you
will set up your Windows system to provide quick access to both your
file directory and your command-line environment. Please follow these
instructions carefully!
1. Open your browser and go to
http://java.sun.com/j2se/1.5.0/download.jsp
fig.1
2. Select the correct link for your operating System. For Windows, choose
the link shown.
3. When the licensing agreement appears, read and accept it.
fig.2
4. Save the software to your system.
fig 3.
5. Make note of the version of Java that you are downloading. You will
need this information to set up the Path in later steps.
6. After the download is completed, double-click on the icon to begin the
installation.
fig.4
7. The screen will now display a Security Warning. There is no danger to
your computer; simply select ‘RUN’ to start the setup. If you do not
receive this notice, go to the next step.
fig 5.
8. Read and accept the License Agreement.
fig 6.
9. The software installation option screen will then open.. Accept the
‘ Install to: ’ path, and again, make note of this directory. Click on
‘Next’
fig. 7
10. Select the browser for the Java installation. If you have more than one,
choose Internet Explorer. Press ‘Install’
fig. 8
11. The Java software and Java Runtime Environment will now be
installed.
12. When the installation is complete, select ‘Finish’.
Creating a Working Environment
13.
Open the My Computer folder.
14.
Open your C:> Drive folder.
15.
Right-click your mouse, and choose the option NEW, then
FOLDER.
fig.9
16.
Name the new folder “Java Working Directory”.
17.
Close the C:> drive folder and the My Computer folder.
18.
Return to the Desktop.
19.
Right-click the mouse, and choose NEW, then SHORTCUT.
20.
Name the shortcut “C:\Java Working Directory”. (Include
the quotation marks in this instance. It will allow Windows
to recognize the spaces between the words.)
21.
Click NEXT, and then FINISH.
22.
The Java Working Directory folder will now appear on
your desktop.
fig. 10
23.
24.
25.
Return to the Desktop
Right-click the mouse, and choose NEW, then SHORTCUT.
Enter the command line: CMD.EXE
26.
27.
Click NEXT.
Name the shortcut Java Environment.
fig. 11
fig.12
28.
The Java Environment icon will now appear on your
desktop.
29.
30.
Right-click on the Java Environment icon.
Click on Properties. The Properties window will open.
fig. 13
31.
32.
Click on the Program tab.
Set the program properties to match figure 14 exactly.
Fig. 14.
33.
Next, select the SCREEN tab. Make sure the setting match
those in figure 15.
fig. 15.
34.
35.
When the settings are correct, click on APPLY.
Close the Properties Window.
Setting the PATH under Windows XP:
1.
2.
3.
4.
5.
6.
Click on START
Under "Settings" click on "Control Panel"
Switch to "Classic View" (upper left side of window)
Click on the "System" icon.
Click on the "Advanced" tab.
Click on the "Environment Variables" button (bottom center of
window).
7. Highlight "PATH" (in the top window) and click the "edit" button.
NOTE: YOU SHOULD NOT EDIT OR MODIFY THE "SYSTEM
VARIABLES”; modify the User Variables instead.
8. Edit the "PATH" so it begins C:\Program
Files\Java\jdk1.5.0_02\bin;
9. (note: if you install Java into a different directory, you may need to
change the directory from that listed above)
10. After you have finished editing the PATH, click "OK". You are done
setting your PATH. Now you have to create a new variable, called
your CLASSPATH.
11. Click on the "NEW" button below the top window.
12. Under 'variable name' type CLASSPATH
13. Under 'variable value' type “ . “ (a single period).
14. Click OK.
15. EXIT the control panel.
16. Restart your computer.
17. Test your installation by opening up the Java Environment window
and verifying that both the commands "java" and "javac" are
recognized.
Setting the CLASSPATH under Windows XP
NOTE: If a command is given in quotes for you to type, DO NOT TYPE THE QUOTES
18. Click on START (lower left)
19. Under "Settings" click on "Control Panel"
20. Switch to "classic view" (upper left) -- not "category view"
21. Click on the "System" icon.
22. Click on the "Advanced" tab.
23. Click on the "Environment Variables" button (bottom).
24. Now you have to create a new variable, called your CLASSPATH.
25. Click on the "NEW" button below the top window.
26. Under 'variable name' type CLASSPATH
27. Under 'variable value' type “ . “ (a single period).
28. Click OK.
29. EXIT the control panel.
30. Restart your computer.
31. Test your installation by opening up a DOS window and verifying
that both the commands "java" and "javac" are recognized.
Alternative method of creating a path/classpath:
Create an AUTOEXEC.BAT file :
1. Click on START
2. Click on RUN
3. Where is says "open" type in "CMD" and click OK. This will open a
‘DOS’ prompt.
4. Type "cd c:\"
5. Type "notepad autoexec.bat" -- this will bring up the notepad
editor.
6. In this editor type the following two lines:
set PATH=%PATH%;C:\Program Files\Java\jdk1.5.0_02\bin;
set CLASSPATH=.
7. Exit notepad.
8. Restart your system.
Good luck in your Java Programming Course!