The Run page of the Project Properties dialog box lets you set the main class and parameters to pass to your application, applet, JavaServer Page/Servlet, Enterprise JavaBean, or test application at runtime. Available features vary by JBuilder edition.
There are several ways to display this page:
When you display this page from the Runtime Configurations dialog box, the Configuration Name field is displayed at the top of the page. The Runtime Configurations dialog box is a feature of JBuilder Professional and Enterprise.
The Compile Before Running and Compile Before Debugging options are displayed at the bottom of every page:
Each tab represents a type of process. The Run Process icon is displayed on the selected tab, showing the currently active process.
Use the Application tab to set options for running applications.
The name of the class to run. Click the ellipsis button to display the Select Main Class For Project dialog box, where you choose a class to run.
The selected class must have a method named main()
.
When you select a class in your project that has a main()
method and run it, this class is automatically set as the process to run, and all of its saved settings are used.
Parameters to pass to the Java Virtual Machine (VM) compiler. For more information on the Java VM compiler and the options you can pass to it, see "Basic Tools: java - The launcher for Java technology applications" at http://java.sun.com/products/jdk/1.3/docs/tooldocs/tools.html.
Parameters to pass to the application. These are command-line arguments and are passed as strings.
Use the Applet tab to set options for running applets.
The name of the applet main class to run. Click the ellipsis button to display the Select Main Class For Project dialog box, where you choose the main class to run. The selected class must contain an init()
method.
Note: When this option is selected, choosing Run|Run Project runs the applet in JBuilder's applet viewer, AppletTestbed.
The name of the HTML file containing the <applet>
tag. Click the ellipsis button to display the Choose HTML File To Run dialog box, where you choose the HTML file with the <applet>
tag. The HTML file's code
attribute must contain the fully qualified class name. If the class file is not located in the same directory as the HTML file, the codebase
attribute must specify the location of the class file in relation to the HTML file.
Note: When this option is selected, choosing Run|Run Project runs the applet in Sun's appletviewer.
Parameters to pass to the Java Virtual Machine (VM) compiler. For more information on the Java VM compiler and the options you can pass to it, see "Basic Tools: java - The launcher for Java technology applications" at http://java.sun.com/products/jdk/1.3/docs/tooldocs/tools.html.
The initial width of the AppletViewer. This is a required field.
The initial height of the AppletViewer. This is a required field.
Optional parameters to pass to the applet. Examples of optional parameters are CODEBASE
, ARCHIVE
, NAME
, HSPACE
, VSPACE
and PARAM
.
Adds a parameter and value to the Applet Parameters list.
To set an applet parameter, click the Add button. Enter the name of the parameter in the Parameter column. Enter the value in the Value column.
Removes the selected parameter and value from the Applet Parameters list.
See also
This page is a feature of JBuilder Professional and Enterprise.
Set the options on this page to select the servlet or JSP file to run and to set properties for the selected web server.
Click the ellipsis button to the right of the Launch URI field to choose the JSP or servlet to run. The Type Or Choose URI To Launch dialog box is displayed.
For more information see, "Setting run parameters for your servlet or JSP" in the Web Application Developer's Guide.
Enter any parameters to pass to the Java Virtual Machine (VM) compiler. For more information on the Java VM compiler and the options you can pass to it, see "Basic Tools: java - The launcher for Java technology applications".
Enter any user parameters in the Query String field. User parameters are a series of name/value pairs separated by an ampersand, for example, a=1&b=2. You can also enter a query string if the client is using the doGet()
method to read information from the servlet or JSP. This string is appended to any URL generated for a web run, and usually includes parameters for the servlet or JSP.
For more information see, "Setting run parameters for your servlet or JSP" in the Web Application Developer's Guide.
Enter the name the web server should assume in the Host Name field. Do not choose a name already in use in your sub-net. localhost is the default.
For more information see, "Setting web run options" in the Web Application Developer's Guide.
Enter the port number the web server should listen to in the Port Number field. Use the default port number, 8080.
Change this value only if the default value is in use.
For more information see, "Setting web run options" in the Web Application Developer's Guide.
Choose the Search For Unused Port option to tell JBuilder to choose another port if the specified one is in use. (The port is only searched for the first time a web run is requested.) It is useful to select this option when you are running more than one servlet or JSP, as otherwise you might get a message that the port is busy. It is also useful to check this option in the event that a user problem brings the web server down. With this option selected, you will be protected if the web server is not shut down properly. This option works in conjunction with the Launch options on the IDE Options page when the specified port is in use by a non-web process. (See Web page (IDE Options dialog box) for more information.)
For more information see, "Setting web run options" in the Web Application Developer's Guide.
Choose the Disable Tracing To Server Classes option to prevent tracing into server-side classes. For more information about tracing, see "Controlling which classes to trace into" in the "Debugging Java programs" chapter of Building Applications with JBuilder.
This is a feature of JBuilder Enterprise.
Use this page to prepare running your enterprise bean using the application server of your choice. JBuilder suggests parameters that will be suitable for most of your needs, but you can make the changes you want.
Displays the name of the target application server (the application server the enterprise bean will run on.) Specify the target application server using the Server page of the Project Properties dialog box.
Specify any parameters you want to pass to the Java Virtual Machine (VM) compiler.
Specify the parameters you want to pass to the target application server.
The name of the application server instance that will be running your enterprise bean.
The fully-qualified names of the JAR files that will be created and deployed to the specified application server instance.
Adds the project classpath to the classpath of the generated command line.
This is a feature of JBuilder Enterprise.
Use the Test tab to runtime options for unit tests. For more information on unit testing, see "Unit testing."
The name of the class to run. Click the ellipsis button to display the Select Main Class For Project dialog box, where you choose a class to run.
The selected class must have a method named main()
.
When you select a class in your project that has a main()
method and run it, this class is automatically set as the process to run, and all of its saved settings are used.
Parameters to pass to the Java Virtual Machine (VM) compiler. For more information on the Java VM compiler and the options you can pass to it, see "Basic Tools: java - The launcher for Java technology applications" at http://java.sun.com/products/jdk/1.3/docs/tooldocs/tools.html.
The test runner to use when running unit tests. The available test runners are:
Use this option to specify one MIDlet as the default MIDlet to run. Click the ellipsis to browse to the MIDlet that is the main class for this project. The first MIDlet created in the project is specified by default.
Use this option to select running from a JAD file and specify which JAD file to run. You must have archived your project and created a JAD file before using this option. If you use JBuilder Personal, you must create the JAD file then add it to your project before you can run from it. If you use the Archive Builder in JBuilder Professional or Enterprise to create a MIDlet Suite, you must re-build before you can select this option since the Archive Builder creates the JAD file for you.
Note: You can run multiple MIDlets without having to archive first. Select multiple MIDlets in the navigation pane by holding down the Shift key as you select them. Then right-click and choose Micro-Run.
Use the OTA URL (Over The Air URL) to run a JAD file stored on a local or remote server. Click the ellipsis button to specify the Storage Name or the URL where the JAD file is located.
Note: This option is only available if the JDK you are using supports (OTA) provisioning.
Specify any parameters you want to pass to the Java Virtual Machine (VM) compiler at runtime.
Specify any parameters you want to pass to the emulator at runtime.
Specify the device to use for the emulator.
MIDlet parameters are user defined. Specifying them in the Project Properties makes them the default runtime parameters for all MIDlets in the project. If you enter them in the Default Project Properties, the will be the runtime default for all MIDlets created in all projects.
To enter a new parameter, click Add, then enter a parameter name in the first column and a parameter value in the second column. To remove an existing parameter, select either the parameter name or value and click Remove.