handout #2

CSE142 -- Computer Programming I

Installing Java for Windows

For this course we will be using a combination of two software products: the Java tools from Sun Microsystems and a simple editor called TextPad.  The Java tools are known as the Java SDK (Software Development Kit), which is distributed freely by Sun Microsystems.  It includes a Java compiler and a Java runtime system.  TextPad is a shareware text editor.  The Computer Science and Engineering Department has purchased a site license for the use of TextPad to support CS instruction.  Both of these have already been installed on the machines in the Introductory Programming Lab in Mary Gates Hall.

Getting the Java SDK and TextPad on a Windows Machine

Sun has just released version 1.5 of the SDK, but I recommend that you use the previous version, SDK 1.4.2.  The new version has some nice features, but we don’t know yet how well it will work with TextPad.  You can get a copy of the SDK at this url:

http://java.sun.com/j2se/1.4.2/download.html

Install the SDK before you install TextPad.  You can get TextPad from:

http://www.textpad.com/download/index.html

Configuring TextPad

TextPad should automatically configure itself for use with the SDK, but there are a few settings you might want to choose.  Go to the “Configure” menu and select “Preferences.”

1.      If you want to see line numbers in the editor (because the Java compiler gives line numbers when it reports errors), select “View” and “Line numbers.”

2.      If you want Java files to be automatically opened by TextPad, select “Associated Files.”  Under “New extension” select “.java”.  Then click on “Add”.

3.      If you want TextPad to use Java files by default when bringing up a file dialog, select “File Name Filters.”  You will see a list of filters including “.java”.  Select this filter.  Then click on “Move up” until it is at the top of the list.

For any of these options to take effect, you will have to select “apply”.