16.3. Using Parameters in Eclipse¶
16.3.1. Using Parameters in Eclipse¶
Sometimes your projects developed Eclipse need to use command line parameters. You can view a tutorial of the material.
1. Open your project and select the drop down arrow next to the Green Run Arrow
(circled below). If you cannot see this arrow then you may be in the wrong
Eclipse perspective. Select Window
-> Open Perspective
-> Java
.
2. You will now see a Run Configurations
window. Select the Java
Application
section. Now depending on whether or not you have ran this project
previously you may or may not have a configuration saved. If you have one saved
already then continue on to Step 3. Otherwise select Java Application
and
right click on new
.
3. You will now have a profile inside the Java Application window. Select the
arguments
tab and add the command line arguments that you would like to run
(in this case I am adding the -h argument).
4. You may now hit Run and the program will launch with the parameters you provided. The Console window will display any output from your program.
5. To change the parameters you can either create a new profile or edit an existing profile.