Java Software Development Kit (JDK 5.0 Update 14) Installation Step
by Step Instructions
1. Click the download link “Download the Java Software Development Kit (JDK 5.0 Update 14) from Sun
Microsystems” available from the Resources tab in the course website http://www.ecs.umass.edu/ece/ece122/
3. Click Download to continue
5. Click on the file name to start downloading.
7. Once your file is downloaded, navigate to the directory where you saved the file and double click the file to begin the installation
16. Download the correct installable according to your operating system.
17. Save the executable file. Dr Java doesn’t require installation. Just the executable file is sufficient. 18. Once downloaded, click the executable file to run Dr Java
20. Let’s try out a sample program now.
21. In the editor window, type the following program: class HelloWorld
{
public static void main(String args[]) {
System.out.println("Hello ! Welcome to Java !"); }
22. Next, save your program, say in your desktop. Click File and Save. Select Desktop from the directory structure and save your file as shown:
24. Alright. Now let’s run our first program. Click Run
APPENDIX
The following PATH variable settings are not required under normal installation conditions. However you may try the following in case you face any issues installing Java.
If you are using WindowsXP, follow instructions under XP Path Setting. If you are using Windows Vista, follow instructions under Vista Path setting
Windows XP Path Variable Setting
1. At the left bottom corner of your computer desktop, choose Start -> Setting -> Control
Panel, and double-click System
2. On Microsoft Windows NT, select the Environment tab; on Microsoft Windows 2000/XP select the Advanced tab and then Environment Variables.
3. For either User variables or System variables, click New and in the popup window, enter Variable name as CLASSPATH (note that all letters should be capital), and the directory where your JSDK is installed as the Variable value.
For example:
If your JSDK is installed at: C:\Program Files\Java\jdk1.6.0_04 Put the following line as the value:
C:\Program Files\Java\jdk1.6.0_04\bin; C:\Program Files\Java\jdk1.6.0_04\jre\bin;
The first is where the java compiler 'javac' is, the second is the java run time environment 'java' is, and the final '.' denotes your working directory, so that the compiler and jre will find where your programs are. To be safe, you may also want to append the above line to then end of your PATH variable. Use ';' as the separator.
Save the variables, test the setting by opening a DOS prompt, type in echo %CLASSPATH%
If your environment variables are set correctly, you should see your settings. Or, you can just type in
javac java
You do NOT need to restart your computer when installing Java.
• Check whether TextPad and Java SDK work on your computer
o Download HelloWorld.java available in the Syllabus section at the class website
into your local drive. Be sure that filename is case sensetive in JAVA programming.
o Start TextPad, and open this HelloWorld.java file.
o Click menu "Tools" ---> "Compile Java" to compile java file. o Click menu "Tools" ---> "Run Java Application" to run this file.
If you see "Hello World" in a DOS PROMPT window, that means there is no problem with your TextPad to compile/run Java program. Congratulations. You can start your java programming now. If you see some errors when run Java program, please click here to get more information.
• For a more comprehensive description on how to setup Java environment on
Windows machinese, please refer to the Sun document at: http://java.sun.com/j2se/1.4.2/install-windows.html
Windows Vista Path Variable Setting
1. Right click My Computer in desktop and click properties. On the left side, click on
Advanced System Settings. On the system properties window, click on Advanced tab. Click Environment variables.
2. For either User variables or System variables, click New and in the popup window, enter Variable name as CLASSPATH (note that all letters should be capital), and the directory where your JSDK is installed as the Variable value.
For example:
If your JSDK is installed at: C:\Program Files\Java\jdk1.6.0_04 Put the following line as the value:
C:\Program Files\Java\jdk1.6.0_04\bin; C:\Program Files\Java\jdk1.6.0_04\jre\bin;
The first is where the java compiler 'javac' is, the second is the java run time environment 'java' is, and the final '.' denotes your working directory, so that the compiler and jre will find where your programs are. To be safe, you may also want to append the above line to then end of your PATH variable. Use ';' as the separator.
Save the variables, test the setting by opening a DOS prompt, type in echo %CLASSPATH%
If your environment variables are set correctly, you should see your settings. Or, you can just type in
java
If your PATH and CLASSPATH is correct, windows should recognize those commands. You do NOT need to restart your computer when installing Java.
• Check whether TextPad and Java SDK work on your computer
o Download HelloWorld.java available in the Syllabus section at the class website
into your local drive. Be sure that filename is case sensetive in JAVA programming.
o Start TextPad, and open this HelloWorld.java file.
o Click menu "Tools" ---> "Compile Java" to compile java file. o Click menu "Tools" ---> "Run Java Application" to run this file.
If you see "Hello World" in a DOS PROMPT window, that means there is no problem with your TextPad to compile/run Java program. Congratulations. You can start your java programming now. If you see some errors when run Java program, please click here to get more information.
• For a more comprehensive description on how to setup Java environment on