Testing the UI at runtime
When you're ready to test your program, you can simply run it, or you can run it and debug it at the same time.
To run your program without debugging,
- Load the file(s) you want to test into JBuilder. This might be one .java source file, or a project.
- Be sure the files have been saved to disk.
- Select the project file (.jpr), or a .java file in an application, or the HTML file that contains the APPLET tag in an applet.
- Choose Run|Run, press F9, or click the Run button
.
JBuilder will compile and run your program. Any errors during compile are displayed in an error pane at the bottom of the Content pane. If there are errors, compiling halts so you can fix the errors found and try again.
Alternatively, you can first choose Build|Make project to compile the project, then click the Run button on the toolbar.
If you get errors, runtime exceptions, or other program misbehavior, you may want to debug your program as you run it to find the problems. You do that by running the program in JBuilder's integrated Debugger.
If you want to debug your program, you need to compile it with debug information. The default property setting for a JBuilder project generates debug information when compiling. When this is selected, JBuilder generates information in your class files during compilation that will enable symbolic information to be seen when debugging.
To run your program in the Debugger,
- Load the file(s) you want to test into JBuilder. This might be one .java source file, or a project.
- Be sure the files have been saved to disk.
- Select the project file (.jpr), or a .java file in an application, or the HTML file that contains the APPLET tag in an applet.
- Choose Run|Debug, press Shift+F9, or click the Debug button
.
- Debug your program and correct any errors.
For more information on compiling and debugging Java programs, see:
Building Applications with JBuilder: Compiling Java programs
Building Applications with JBuilder: Debugging Java programs