Setting Launch Options
See Also
Before a project can be compiled in Visual J++, you need to define the project file that will be loaded first and used as the entry point of the application. You can select this file by either choosing it from a list of available project files, which uses a default program and command line, or select a custom program and command line. For most applications, the default program and command line arguments are sufficient. Specifying a custom program and command line are usually used when you need to define a custom command line to pass to your application when it is run within Visual J++. You can also use the custom program option when you are developing a WFC control or COM DLL that needs to be tested from a separate program.
To select the build configuration
-
On the Project menu, click <Project> Properties (where <Project> is the name of the project that is currently selected in the Project Explorer).
The <Project> Properties dialog box appears.
-
Select the Launch tab.
-
In the Configuration drop-down list, choose the build configuration for which you want the Launch tab settings to apply.
To choose the entry point file with default program and command line
-
On the <Project> Properties dialog box, click Default to enable the default options.
-
In the When project runs, load drop-down box, select the name of the file you wish to use as the entry point to your application. The following are the types of files that can be displayed in the list:
-
Any Java classes that have a main method defined.
-
HTML files.
-
Java classes that extend java.lang.Applet.
The Program text box identifies the program that will launch your application, based on the type of file selected from the entry point list. The Arguments text box shows command line arguments that are to be passed when the program runs.
-
If the file selected from the entry point list is a Java source file, you can select the Launch as a console application check box to run your application with JView instead of WJView. JView displays all output from your application in a console window, while WJView displays all output in the Output Window.
To choose the entry point file and define a custom program and command line
-
On the <Project> Properties dialog box, click Custom. By default, the Program and Argument text boxes contain the same project file, program, and arguments that are defined in the Default section.
-
In the Program text box, enter a new program name to run or modify the existing program name.
-
In the Arguments text box, enter a new list of arguments to use or modify the existing arguments list. The default arguments supplied also include the name of the project file that will be used as the entry point.
Note If you want to configure a different entry point file for a debug build versus a release build of your project, you can use the Configuration drop-down list to specify the new settings.