Java Reference
In-Depth Information
Setting the Classpath and JDK
In order to select the JDK and the Classpath for running an application, IDEA
provides the list of modules as configured for this project. Selecting the module
from the drop-down list in the Run/Debug Configurations window provides the
Classpath and JDK as configured for that module. Changing the list of selectable
modules requires reconfiguring the modules for the current project. See
chapter 4 for information regarding adding modules to and removing them from
your project.
Modifying application default settings
If you have a complicated set of arguments and parameters, you can save time by
changing IDEA 's default application settings. Click the Edit Defaults button
underneath the list of configurations on the left in the Run/Debug Configura-
tions window to bring up the default settings dialog. You can specify a default
class, program parameters, VM parameters, working directory, and which mod-
ule's JDK and Classpath should be used for all newly created application profiles.
If you're editing a class with a valid main() method, you can create a
Run/Debug configuration for it by right-clicking and selecting the Cre-
ate < classname >.main() option. Doing so brings up a configuration
profile dialog prepopulated with information for running the current
class. You can also create a Run/Debug configuration by right-clicking a
class in the Project window.
TIP
Managing the list of configuration profiles
Using the icons above the list of configuration profiles in the Run/Debug Config-
urations window, you can remove items, copy them, and reorder the list. Click the
remove icon to delete configuration profiles that you no longer need. Use the
arrow icons to reorder the list. The order of the configuration profiles determines
how they appear in the Run/Debug drop-down list on the main toolbar. As we
mentioned earlier, the copy icon creates a copy of the currently selected profile,
allowing you to use it as a template for a new configuration profile.
Run/Debug options
The Run/Debug Configurations screen includes a couple of checkbox options at
the bottom. The first, Display settings before running/debugging , instructs
IDEA to pop up the settings panel you've been working with each time you run an
application in IDEA . This gives you a chance to tweak the settings, perhaps adding
new arguments or changing the working directory, for example, before executing
 
 
 
Search WWH ::




Custom Search