The JBuilder compiler has full support for the Java language, including inner classes and Java Archive (JAR) files. You can compile (or "make") from within the IDE. With JBuilder Professional and Enterprise, you can also compile from the command line using bmj (Borland Maker for Java) or bcj (Borland Compiler for Java).
The Run command compiles and runs projects, individual .java
files (such as JSPs), or HTML applets.
JBuilder's integrated debugger allows you to run a project or file with or without debugging it. In JBuilder Professional and Enterprise, you can set runtime configurations appropriate for the kind of file or program that you want to run, whether it's an application, an applet, a JSP, a servlet, or an EJB.
A Java compiler reads Java source files, determines which additional files need to be compiled, and produces the Java program in the form of .class
files containing bytecodes that are the machine code for the Java Virtual Machine (VM).
Compiling produces a separate .class
file for each class declaration and interface declaration in a source file. When you run the resulting Java program on a particular platform, the Java interpreter for that platform runs the bytecodes contained in the .class
files.
To compile the source files for an application or applet, follow these steps:
Note: If you haven't already set the runnable class, the Run page of the Project Properties dialog box appears. Browse to the runnable class and select it to continue compiling.
Compiler error messages are displayed in the message pane below the AppBrowser content pane. Select an error message to display the relevant source code. To get help on an error message, select the error message in the message pane and press F1. To learn about error messages in JBuilder, see "Error and warning messages" in Building Applications with JBuilder.
Running a project runs the main class of that project file. If a main class has not yet been selected, then when you try to run it, a dialog box appears so you can make the selection. If you created your file usin the Application wizard or the Applet wizard, the main class is automatically selected. You can select or change the main class by selecting Project|Project Properties and choosing the Run tab.
If you want to run a .java
file such as a JSP, it must contain a main
method.
To run an applet, select the HTML file that contains the <APPLET>
tag. The HTML file calls the class found in the CODE attribute of the <APPLET>
tag. This applet class must contain an init()
method.
To run in JBuilder:
Runtime error messages are displayed in the message pane below the AppBrowser content pane. Select an error message to display the relevant source code. To get help on an error message, select the error message in the message pane and press F1. To learn about error messages in JBuilder, see "Error and warning messages" in Building Applications with JBuilder.
For more information on running programs, see "Running Java programs" in Building Applications with JBuilder.
For more information on running applets, see "Working with applets" in Building Applications with JBuilder.
For more information on running JSPs and servlets, see "Developing JavaServer Pages (JSP)" and "Developing servlets" in the Distributed Applications Developer's Guide.