Home Page TextPad Page Lejos Page Moodle Page Karel Page Install Rite Page Links Page About Page
Toolbar Graphic
How To Configure | Tool Settings | About
How To Configure TextPad For
AP Computer Science Java

Created By Dan Eliot
deliot@pylusd.k12.ca.us
El Dorado High School
Placentia, CA, USA
Last Modified: 

The goal of this web page is to show how to install TextPad as a compiler for Advanced Placement Computer Science Java. TextPad is a very straightforward text editor with syntax highlighting and the ability to run outside programs or "tools".

When the steps below are completed, TextPad will have the ability to compile Java, run Java applications, and run Java applets. Optionally, TextPad will be able to Compile All Java, Create JavaDocs, and Create Java Archives. Optionally, TextPad will be able to create Karel J Robot Java projects, AP Marine Biology Simulation Java Projects, AP Java Subset Projects (ICT Curriculum), and use Chris Nevison's Java I/O utilities.


NOTE: This tutorial assumes that all programs are installed in their default locations on the C:\ drive of a Windows 95, 98, ME, 2000, or XP system. Alter locations as you see fit. Paths and filenames may be different if newer versions of software are being used.




TEXT INSTRUCTIONS: SCREENSHOT GUIDES
STEP 1
Download each of the following items:

A) Sun Java Software Development Kit (SDK), which provides the ability to create Java applications and applets.
B) TextPad, which will be used to edit Java code
C) (optional) A TextPad Registry File, which will provide a quick way to add 3 more useful Java Tools to TextPad. Download this version for Win 9x/NT. Download this version for Win 2k/XP.
D) (optional) Assorted JAR files, which will provide useful AP functionality
E) (optional) An API Bundle, which provides Java API documents for many of the AP related extras.

**Due to size considerations, the full Sun Java API is NOT included in this bundle. The Official Sun Java API, can be found HERE


STEP 2
Install IN ORDER the main components:

A) Double Click the .exe file to install the Java SDK
C) Double Click the .exe to install TextPad (TextPad MUST be installed last)


STEP 3
Create a location for special .class and .jar files:

A) Many sites suggest placing user .class and .jar files in the Java "\LIB\EXT" folders. This doesn't seem to always work (especially for the AP Marine Biology Simulation). A better solution is to create a separate folder for special .class and .jar files. This makes the CLASSPATH longer, but everything works, including MBS.
B) Open "jar_files.zip" and place the folder found within on the C:\ drive, this creates a folder called "JavaStuff".
C) The .zip file includes the AP subset, AP MBS, Karel Robot, and CHN I/O Jar Files.


STEP 4
Modify PATH and CLASSPATH Windows settings:

This step is really important, be very careful. If you are using different folders or drives than the example, you will have to modify accordingly.

For everything to work smoothly, the PATH statement must point to the location of the Java compiler and other programs. Also, the CLASSPATH statement must be added/modified to include links to the "JavaStuff" folder and EACH special .jar file within it. See the pictures at right for assistance. Copy PATH and CLASSPATH info from the text inputs (at right). Path information (ex: j2sdk1.4.1_03) will be different if you install a different version of Java!

If you are using a Windows 95,98, or ME system, edit your Autoexec.bat file to include SET PATH and SET CLASSPATH statements.

If you are using Windows 2000 or Windows XP, you will have to edit your Environment Variables. In Windows XP, follow the path Start --> Settings --> Control Panel --> System --> Advanced --> Environment Variables.

Copy something like the following to the end of the PATH statement:

Copy all of the following for the single line CLASSPATH statement:


STEP 5 (optional)
Configure additional Java Tools:

After installation, you will find 3 default tools in the TextPad TOOLS menu, Compile Java, Run Java Application and Run Java Applet. It would be nice to add 3 additional tools:
A) "Create JavaDocs" which creates Java documentation of every .java file in the current folder. and place them in a folder called "MyDocs".
B) "Compile All Java" which compiles every .java file found in the current folder (useful for AP MBS and other large projects).
C) "Create Java Archive" which allows creation of a .jar file called "MyJarFile.jar" from every .class file found in the current folder.

To Do this, unzip the "textpad_registryXXXX.zip" file downloaded earlier. Inside you will find textpad_registryXXXX.reg. This file adds 3 additional tools to the registry settings for TextPad 4.X. As with any registry editing, backup the registry for safety and security.

To make sure your tool settings are accurate (and/or if you would like to do this by hand, and not edit the registry), compare to the tool settings screens pictured here.


STEP 6 (optional)
Install AP Related Java APIs:

To install APIs for Karel Robot, the AP Subset (from ICT curriculum), AP MBS, and Chris Nevison's I/O Utilities, click on the file "api_files.zip" and place these files in the location of your choice. Perhaps in the "JavaStuff" folder? You could also create desktop shortcuts to the index.html page found in each API folder.

Again, the Official Sun Java API, can be found at http://java.sun.com/api/index.html.


STEP 7
Test Installation:

At this point, compile, run, and test some .java files. Also, test each of the TextPad tools. I would recommend testing the AP Marine Biology Simulation, Karel J. Robot, Console I/O, etc. Questions, comments, errors, suggestions: deliot@pylusd.k12.ca.us

Some Simple Test Files ("hello world", Karel J. Robot, Chris Nevison's IO):
HelloWorld.java
KarelDefault.java
CHNtest.java


Thanks to Dave Wittry, Troy High School,
for Jar Files, API, and Karel files.
Thanks to Chris Nevison for his I/O Utility
classes and knowledge of TextPad.

Other Great TextPad/Java links:
http://cs.colgate.edu/APCS/Java/JavaSystemsPages/textpad.htm
http://cs.colgate.edu/APCS/Java/JavaSystemsPages/classpath.htm
http://cs.senecac.on.ca/~bpj444/pages/TextPad_config.html
http://acm.cs.columbia.edu/jett/JavaMBS/ExecutionInformation/TextPadInfo.html
http://www.iona.edu/faculty/jmallozzi/TPSetup.htm

If TextPad is not your cup of tea.. um... I mean.. Java, try JCreator or BlueJ.
Dave Wittry has excellent configuration information for JCreator here.

Home | TextPad | Lejos | Moodle | Karel Robot | Install Rite | Links | About