Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Eclipse prompt me for command line arguments

Tags:

eclipse

I know I can configure command line arguments in the Run configuration but I want to run a java file multiple times with different command line arguments. It's a pain to change the Run Configuration every time.

Is there a way I can make Eclipse prompt me for command line arguments every time I run the program?

like image 477
Rahul Avatar asked Nov 24 '08 02:11

Rahul


People also ask

How do I use Command Prompt in Eclipse?

A fully working command-line Terminal inside Eclipse. Just press Ctrl+Alt+T to open a local command prompt (Terminal).

How do I pass a command line argument in Command Prompt?

option. You can test command line arguments by running an executable from the "Command Prompt" in XP, Vista or later, or from the "DOS prompt" in older versions of Windows. You can also use command line arguments in program shortcuts, or when running an application by using Start -> Run.


1 Answers

Add string_prompt as a Program Argument in the Run configuration.

 ${string_prompt} 

There are also a file_prompt and a folder_prompt if you want specifically files\folders.

These are available through the Variables button on the (x)= Arguments tab of the Run Configuration dialog.

like image 80
Ken Gentle Avatar answered Sep 20 '22 13:09

Ken Gentle