Install the J2SE JDK. See Java Development Kit (JDK).
public class InitialTest {
. . .
}
It must be saved in a file called InitialTest.java . Put it in the directory you created previously.
There no critical preferences that need changing, but they can be set by selecting the
Configure > Preferences menu item.
Some things you might wish to set:
Configure menu > Preferences... > Document Classes > Java > Tabulation
Startup directory to where
your files are normally located.Configure > Preferences... > Tools > Run Java Application.
Set the value in the Parameters text field to -ea $BaseName .
"-ea" is the abbreviation for Enable Assertions.
If you don't know what assertions are yet, don't bother with this.
A: When TextPad can't find the Java compiler, there are two common causes.
C:\Program Files\Java\jdk1.5.0_04
There will also be a "JRE" (Java Runtime Environment), which is appropriate, but be sure there is a "jdk" (Java Development Kit).
A: Check the Configure > Preferences > Tools > Compile Java > Parameters field.
You only need $File in it. Reinstalling TextPad might clear it up.
When I reinstall it I get the following.
-Xlint:unchecked $File
You don't need the -Xlint option (which notes situations where you
could take advantage of Java 5 generics), but you do need the $File.
Put blanks in front and after the $File value.

Exception in thread "main" java.lang.NoClassDefFoundError:
A: The most common cause at this point is that the file name doesn't match the class name. Make sure the names agree exactly first.
Another, much less likely, problem could be that the parameters are set wrong in TextPad.
Look at
Configure menu > Preferences... > open Tools > Run Java Application.
The Parameter field should have $BaseName (with blanks around it).
You can skip the "-ea", which stands for "enable assertions". The Initial Folder should have
$FileDir in it.

A: No. TextPad translates the .java files into .class files which can not be run by double-clicking them. Some IDE's (eg, NetBeans) will produce double-clickable .jar files, and there are programs which will package your Java files into a .exe file.