As you are developing your application, you can run the application in the IDE to test the application's behavior. When you run a project in the IDE, the IDE runs the application from the files in the project's build/classes folder.
Typically, the project that contains the program's main class is set as the main project. You can then run the entire application with the Run Main Project command (F6). You can also run any executable class by choosing Run > Run File > Run my_class (Shift-F6). Alternatively, you can run any project that has a main class by right-clicking its project node in the Projects window and choosing Run Project.
For , the IDE uses settings that you specify in project's Project Properties dialog box. You can set the project's main class, runtime arguments, VM arguments, and working directory.
To run the application outside of the IDE, you first need to use the Clean and Build command so that the project's JAR file is built or updated. For that have a main class specified, the IDE automatically copies any JAR files on the project's classpath to the dist/lib folder. The IDE also adds each of the JAR files to the Class-Path element in the application JAR's manifest.mf file. This simplifies running the application outside the IDE. For more information, see Preparing a JAR for Deployment Outside the IDE
If you are using a , the IDE uses an existing Ant script to run your class. You can write a target that executes the currently selected file in the IDE and map it to the Run File command.