Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 6 of 6
| Caution |
|---|
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.
|
For a sense of what JCreator/jdb debugging looks like, examine Figure 4, which shows the results of trying to execute String s = "abc"; System.out.println (s.charAt(s.length()));.
Figure 4. A debugging session with JCreator and the SDK's jdb debugger. Click on thumbnail to view full-size image.
| Tip |
|---|
| JCreator requires you to explicitly tell the debugger to stop. Stop jdb by typing exit on the Debug tab. |
JCreator provides extensive customization features to personalize your experience. These features range from resizing windows to moving/docking toolbars to a Configure menu with Options and Customize menu items. Four of the many entities you can customize are project templates, code templates, line number display, and syntax highlighting colors:
Think of a project template as providing canned code common to many projects. When you create a project from a template, JCreator places the template's source code in the project's main Java file. Furthermore, depending on the template, JCreator automatically generates an HTML file for that project.
JCreator comes with three project templates associated with the Basic Java Application (an application with a simple GUI),
Basic Java Applet (an applet with a simple paint(Graphics g) method), and Empty Project (no prewritten source code) categories. Though suitable for a variety of Java projects, those
templates are not exhaustive, and you will probably want to create your own project templates. For example, you might want
to create a simple Java application whose code fits into a framework resembling the following code fragment:
class SomeApp
{
public static void main (String [] args)
{
}
}
Except for SomeApp (which should be a generic symbol that represents the project name), let's place this source code into a new project template
called Simple Java Application. Complete the following steps to accomplish that task:
Read more about Tools & Methods in JavaWorld's Tools & Methods section.
setup.tst and Project_Name.java from the ...\JCreator\Templates\Template_1 directory to the Template_4 directory.
setup.tst so that the new project category name appears beside the [LABEL] tag. Once you are done, your setup.tst should look like the following:; This file contains the setup information for a template project. [LABEL] Simple Java Application [DESTPATH] "classes"
Project_Name.java so that it contains the following:/* * @(#)<PROJECT_NAME>.java 1.0