Compiling
The simplest method is to simply "run" your
program by clicking either of the two green VCR-like "play" button
. The plain "run" button will compile any files that have
changed and then run the program. The "run" button with the arrow
and box will compile the project as well,
but will run the program using the debugger.
If you want to manually compile your project or individual files,
under the "Project" menu, there are a number of
choices:
- Make Project :
Compiles only those files in the porject that have changed
since the last time the project was compiled.
- Rebuild Project :
Recompiles all the files in the project.
- Make "XXX.java":
Compiles just the indicated file if it has changed.
- Rebuild "XXX.java": Compiles the indicated
file.
If you are concerned about problems in your project, "Rebuild
Project" is your safest choice.
Compilation Errors
If an error is encountered during
comilation, error messages will appear in the message
window near the bottom of the screen. Double clicking on
the error message will take you to the offending line in the
code.
As always, correct the first few errors
first and try recompiling. Many of the later errors
result from the first few.
Running a Program
To run your program, just click on the green
VCR-like "play" button on the task bar.
If JB cannot find the "main"
method, as may be the case if that file was written externally
to JB . To tell JB which file has the "main"
method, select "Project/Options" from the main
menu. On the "Projects" tab, find and fill
in the "Main Class" field with the name of the
appropriate file (class) with no file extension.
|