Instructor: John E. Darrow
Overview
Student (and instructor) computers need both TextPad and
Java SDK installed.
If the computers are on a network, download to the instructor's terminal first;
share via shared folder.
TextPad
TextPad is a great context-sensitive editor for Java (it shows syntax in
color, indents automatically, supports compiling, etc.) It also enables
you to compile and run programs from within TextPad. (It likewise
displays syntax in color for various other languages such as HTML, C++,
Perl...)
- Prerequisite: the Java SDK is installed, and the
javac
command works. See javac.
- Check if TextPad is installed on your computer:
- Start > Run
- Type
textpad
If TextPad does not appear, download the English/FTP version of TextPad to
your Desktop from here: http://www.textpad.com/download/index.html.
Double-click the TextPad icon (on your Desktop) and install TextPad.
Accept all of the default installation settings.
- Start TextPad. Uncheck "show tips".
- Check each of the following in TextPad's Configure > Preferences:
General: uncheck Allow multiple instances to run
File: set recent to 9, workspace to 4,
and blank the file extension field; leave the rest as-is
View: check Line Numbers
Document Classes > Default: check Automatically indent blocks
Document Classes > Default > Colors > Strings > Foreground: Fuschia (the purple one)
Document Classes > Default > Font: Screen, Courier New, Size 12
Document Classes > Default > Font: Printer, Courier New, Size 11
Document Classes > Java > Tabulation: put 2 in both top boxes AND
check the two boxes below those
Folders > Startup: Type the complete path of the directory
in which TextPad should first look when you use File > Open,
such as c:\jpgm\prog\weekend
Tools: if you see Compile Java, Run Java Application and Run Java Applet,
you are all done. If you do not, click Add > JDK commands
To make Ctrl-F bring up Search/Replace window and to enable F3 to be
a quick "search for next match" key, make the following "Keyboard" changes...
Keyboard: File > FileManage: click "F3" in the "Current keys" list and click Remove (this makes F3 available for something else)
Keyboard: Search > SearchFind: click "Ctrl-F" in the "Current keys" list and click Remove (this makes Ctrl-F available for something else)
Keyboard: Search > SearchFindNext: click in the "Press new shortcut key" field, press the F3 key, click Assign and click Apply
Keyboard: Search > SearchReplace: click in the "Press new shortcut key" field, press Ctrl-F, click Assign and click Apply
- Exit TextPad.
javac
Check if the computer already has the Java Software Development Kit installed:
- Start a command prompt window (Start > Run, and type
cmd or command.)
- In the new window, type
javac (and Enter).
If you see a screenful of messages, javac works correctly,
and you can skip to the TextPad section below.
But if you see a message such as "Bad command or file name,"
type this to find out if Java is even installed on your computer:
java -version
If you get a decent message about version, Java is installed, but your
PATH variable is not correctly set, so go here.
But if java -version also gives a message about bad command, you need
to downlaod and install Java.
Downloading Java
-
With a web browser, go to http://java.sun.com/j2se
-
Click J2SE DOWNLOADS.
- Click the latest J2SE version.
- Click the appropriate links to download the SDK (not the JRE) to
a convenient place such as the Desktop. Its name will be something
like j2sdk-1_4_0_01-windows-i586.exe if you are downloading the Windows
version.
Installing Java
- Run (double-click) the executable file that you downloaded.
- Follow the prompts to accept the basic installation steps and
proposed destination folder. Continue until you see the boxes
for the list of components.
- Uncheck the Java 2 Runtime Environment box and click Next.
- Complete the rest of the installation.
- To determine what has been installed successfully,
start a Command Prompt window and type
javac and you should see many lines explaining the syntax and
use of the javac command.
- If the
javac command is unknown to the computer, you need to
update the PATH system variable to include the bin subdirectory
of your j2sdk directory.
Go here.
John E. Darrow
Other John Links
|