Java Reference
In-Depth Information
Figure 5.19 Alternatively, you can choose the class with a main()
method by navigating your project tree. Folders represent packages,
just like in the Project tool window.
Enter your options into the field if required, or leave it blank if you don't need
any. If you need more room to type, click the icon next to the field to access a
larger text entry dialog.
Specifying program arguments
You can configure the list of arguments passed to your program. Enter in the
arguments into the Program parameters field in the Run/Debug Configurations
window just as you would when running the application from the command line.
These values are passed to the main() method through the arguments array
required by the main() method signature.
If arguments contain spaces, surround them with quotes. If your program
doesn't require any arguments, leave this field blank.
Setting the working directory
The working directory serves as the current directory for the application while it's
running. Essentially, it specifies which directory you want to change to before run-
ning this application. If your application will be accessing local files, this directory
determines the starting point for all relative file paths for both input and output.
You don't need to worry about how your working directory relates to the location
of your class files or your project; IDEA will figure out how to set up the Classpath
appropriately. If your application isn't working with files, then it doesn't matter
what you set your working directory to in the Run/Debug Configurations win-
dow. By default, IDEA sets it to the same directory as your project file.
 
 
Search WWH ::




Custom Search