WARNING: This page contains many screenshots, so it will load very slowly.
Task 1 Download and install SDK
Task 2 Download and install Textpad
Task 3 Write and execute HelloWorld using Textpad
The SDK is the Software Development Kit from Sun. It must be installed on your computer so you can compile and execute Java programs. It is a free download from Sun.
1. Right-click on the button below. It will open a new window, so that you can keep both windows open, for instructions.
The window below opens.
2. Scroll down to this part of the web page, and select Download under "All-in-One Bundle".
l
3. Select the Accept radio button, then click on continue.
4. Double click (single-click for standard XP) the Windows Platform download
5. Click Save
6. Browse to your desktop to save the file, so it will be easy to locate for installation
7. Close the browser window you used to download the JDK installer. You should now see the installer on your desktop:
Install the JDK
1. Double click (single click in standard XP) on the j2eesdk.exe icon.
2. The installer will open. Click Next to begin:
3. Accept the agreement
4. It is best to use the standard installation directory:
5. OK to create new directory
6. Select "Don't prompt for Admin User Name", and choose a simple password. This is not a production environment, so go for convenience over security!
7. You can uncheck "Register Application Server", but leave the last option ("Add bin directory to PATH") checked.
8. Click Install Now to begin installation
.
9. Wait a few minutes for the installation to complete, then click Finish.
10. A screen will open in which you may register your SDK. You do not have to register to use it.
Download TextPad
Textpad is a shareware product that can be used as a simple editor and
compiler for Java. We will use it for the first few programs we write. It is a
free download, but it is not freeware. If you keep it after the evaluation
period, you must pay for it.
1. Right-click on the button below. It will open a new window, so
that you can keep both windows open, for instructions.
This page will open. Select TextPad downloads, as shown below:
2. Select English only and one of the two HTTP sites, as shown
below:
3. Click Save.
4. Browse to save the installation file to your desktop
5. Close the browser window you used to download the TextPad
installer. You should now see the installer on your desktop:
Install TextPad
1. Double-click (single click in standard XP) the txpeng icon.
2. Follow the prompts as shown below:
3. You can choose any name and organization, and you may choose to
install only for yourself:
1. Start TextPad from the menu.
2. Wait about 3 seconds for the "nag screen" to
disappear..
3. OK to close Tips (you may turn them off for the future, if you want)
4. This is the TextPad editor. Type the
"HelloWorld" program into it as shown:
5. Select File - Save
6. Change the location to Desktop, the File "Save as Type" to
Java, and name the file "HelloWorld", because files in Java must have
the same name as the class name.
7. Notice that two things in Textpad have now changed:
Compile HelloWorld in Textpad
1. Select Tools - Compile Java from the menu
2. The compiled file has the same name, HelloWorld, but a new extension
".class". It is located in the same folder as the Java source
code file, so it is on the desktop:
Execute HelloWorld in Textpad
1. Java files are not executable in the same way that Windows file
are. That is, you cannot just double-click on the file to run it.
Instead, follow the steps below.
Select Tools - Run Java Application from the menu
2. Your application runs, and a DOS window opens with the output.
You have installed the Java Development Kit and a Java development tool
(TextPad), and you have written and executed a Java program.
If you'd like a preview of the first few hours of class, so that you'll
be better prepared, a syntax tutorial and exercises are available here.
All the information in the tutorial and exercises will also be covered in
class.