Study guide: Tools of the trade, Part 1

Brush up on Java terms, learn tips and cautions, review homework assignments, and read Jeff's answers to student questions

Glossary of terms

code template
The combination of a code sequence and an abbreviation. When you type the abbreviation and the Tab key, JCreator's editor replaces the abbreviation with the code sequence.
An application, applet, or other program type.
project templates
Files of prewritten source code and special symbols.
selection margin
A vertical margin to the left of source code lines that facilitates line selection.
A directory whose subdirectories identify a project and zero or more subprojects (that is, packages).

Tips and cautions

These tips and cautions will help you write better programs and save you from agonizing over why the compiler produces error messages.


  • To display a pop-up list of all available abbreviations, either select Code Templates from the Edit menu or press the Ctrl, Shift, and N keys simultaneously.
  • For projects consisting of several source files, using Compile Project is time consuming because that menu item causes all source files to compile. When only a single source file has changed, and when that file appears in the Editor window, you save time by selecting Compile File from the Build menu, which recompiles only the file in the Editor window.
  • JCreator requires you to explicitly tell the debugger to stop. Stop jdb by typing exit on the Debug tab.


  • Because Execute Project does not cause an uncompiled project to compile, you see error messages if a project's class files do not exist. You must therefore compile a project before executing it.
  • Attempting to use jdb's locals command to view the contents of a classfile's local variables can fail if javac compiled the equivalent source file with the -g debugging option unspecified.


  • What is a project template?
  • What is a code template?
  • What is a JDK profile?
  • How do you set the classpath?
  • How do you pass command-line arguments to an application?
  • How do you add the -g debugging option to javac from within JCreator?

Answers to last month's homework

Last month, I asked you to answer some questions and enhance the Editor program. Here are my answers (which appear in red).

1 2 Page 1
Page 1 of 2