JavaPerspective.com >
Intermediate Tutorials >
1. The Eclipse IDE >
1.3. Tips about Eclipse >
1.3.5. How to use command-line arguments in Eclipse
1.3.5. How to use command-line arguments in Eclipse
Last updated: 25 January 2013.
Select the class containing the main method in the package explorer. Right-click the selected class and click Run As -> Run Configurations as shown below:
When you click Run As -> Run Configurations, the dialog box shown below is displayed. Select the Arguments tab and click the Variables button in the Program arguments section:
When you click the Variables button, the dialog box shown below is displayed. Select string_prompt and click OK:
When you click the button OK, the dialog box shown below is displayed. Click Apply to save changes:
When you run your application, you will be prompted to enter command-line arguments in a dialog box as shown below:
You are here :
JavaPerspective.com >
Intermediate Tutorials >
1. The Eclipse IDE >
1.3. Tips about Eclipse >
1.3.5. How to use command-line arguments in Eclipse
Next tutorial : JavaPerspective.com > Intermediate Tutorials > 1. The Eclipse IDE > 1.3. Tips about Eclipse > 1.3.6. How to use TODO and FIXME task tags in Eclipse
Next tutorial : JavaPerspective.com > Intermediate Tutorials > 1. The Eclipse IDE > 1.3. Tips about Eclipse > 1.3.6. How to use TODO and FIXME task tags in Eclipse