Because the IDE builds its project infrastructure directly on top of Apache Ant, it uses Ant scripts to run your Java applications.
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). Alternately, you can run any project that has a main class by right-clicking its project node in the Projects window and choosing Run Project.
If you are using a , the IDE generates the build script based on the options you enter in the project's Project Properties dialog box. You can set the project's main class, runtime arguments, VM arguments, and working directory in the Project Properties dialog box. You can further customize program execution by editing the Ant script and Ant properties for the project.
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.