Close
Register
Close Window

CS3 Data Structures & Algorithms

Chapter 2 Programming Tutorials

Show Source |    | About   «  2.2. Parsing Command Line Parameters In Your Program   ::   Contents   ::   2.4. Installing the Web-CAT Submission Plug-in for Eclipse  »

2.3. Using Parameters in Eclipse

2.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.

Step 1

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.

Step 2

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).

Step 3

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.

Step 4

5. To change the parameters you can either create a new profile or edit an existing profile.

   «  2.2. Parsing Command Line Parameters In Your Program   ::   Contents   ::   2.4. Installing the Web-CAT Submission Plug-in for Eclipse  »

nsf
Close Window