TextPad is a text editor program that can be used as program editor for a variety of programming languages including Java, C, C++, Perl, assembly language, etc.  TextPad can be configured to use syntax coloring and block indentation based on the syntax specification for the desired programming language.  TextPad can also be used to compile and run programs and applications as external tools within the TextPad environment.

TextPad is not a free program, however you can download an evaluation copy and use it for evaluation purposes without charge.  If you decide that you like TextPad and intend to continue using it, you can pay the licensing fee at that time.  The current charge for licensing TextPad is 16.50 (U.K.), or about $33.00 (U.S).  You can download an evaluation copy of TextPad from the following URL:

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

Once you have downloaded and installed TextPad, the following information will provide an overview of how to use TextPad as a programming environment for Java.

Configuring TextPad 

 Use the Configure | Preferences menu to configure various options for TextPad.

 

Configuring Java Preferences 

Basic options available for configuring Java documents include indentation.  Similar options are available for other document types including text documents and C/C++ programs.

 

Specific options available for configuring Java documents include syntax coloring (and color options). 

Other options available for configuring Java documents include tabulation. 

You can configure the necessary environment variables so that TextPad knows the location of the Java root directory. 

You can configure external tools for compiling and running Java applications and applets.

You can configure options related to compiling Java programs or running Java applications or applets.  If the Java application output is captured, as indicated in the following diagram, the output will appear in the Tools Output part of the TextPad window, instead of being displayed in a separate command window.  This can be useful if the program output is long and exceeds the buffer size of a command window.

Using TextPad to create/compile/run a program

To start a new program, you can type some introductory comments, then save the file.  Once you save the file with the .java extension, TextPad invokes Java syntax coloring based on the configured settings.  I like syntax coloring, although some may prefer not to use it.  In this case, I borrowed one of Edo's examples from class.

You can compile and run the program using the Tools | External Tools menu options, if you have configured the Tools preferences.

To run a Java application, use Tools | External Tools | Run Java Application.  If you have configured the options for Run Java Application to prompt for input, you will get a dialog box as shown below.  The Tools Output pane shows the output from a previous test run for the program.  As you can see, the output for this program gives signed integer results, instead of unsigned integer results.  It appears the program needs a bit more work.

Using the command line with TextPad

You can compile and run programs from the command line when you use TextPad as the programming environment.  The information provided in the separate file on compiling from the command line explains how to do that.