Java Reference
In-Depth Information
Figure 3-1.
Tutorial: Running a New Application
There are a couple of common pitfalls at this point regarding running a new application. The inclination is to simply
click the Run button. However, this will run the last application, which was EmployeeApp in MyFirstProject.
1.
Display the Run menu by clicking on the down arrow to the right of the Run button.
The Run menu shows the previously defined “launches” and three menu options: Run As , Run
Configurations... and Organize Favorites... . Choosing EmployeeApp from the menu will also execute
EmployeeApp in myFirstPackage—again, this is not what we want. Choosing Run As… tells RAD to run the currently
active Java source code. In this case, that would be c3.Employee. Running Employee as a Java application would result
in an error since Employee does not have a main method. Ouch, again! (Fortunately RAD won't even let you do that.)
Because we want to run the EmployeeApp in Tutorials/c3, we can define a new launch or change the already
defined EmployeeApp launch. We will change the existing EmployeeApp launch to run EmployeeApp in project
Tutorials and package c3.
2. From the drop down menu, select Run Configurations... .
The Run Configuration frame will be displayed. Any previously defined launches can be found (grouped by type
of configuration) in the pane on the left. If EmployeeApp is not selected, select it now. The launch's definition will be
displayed as in Figure 3-2 .
 
Search WWH ::




Custom Search