On Fri, 2011-02-25 at 17:45 -0500, Phil Freihofner wrote:
> Hi - I was similarly trying to figure out how to pass arguments to a "main" that expects input, and came across the above cryptic exchange. (Seems like some posts are missing? I see just two posts.)
>
> Here is what I ended up doing, using Helios.
> Select Run --> Run Configurations...
> Select tab: "(x)= Arguments"
> Entered my arguments in the text box labeled "Program arguments:"
> Click Run.
>
> The arguments entered persist with the click of the Run shortcut.
>
> Perhaps there is a way to have the IDE prompt for arguments, which would beat having to click through to the "Program arguments:" text box each time.. Still, having this option is better than nothing!
You can use the Eclipse Variables feature in the Run Configurations
dialog. While on the Arguments Tab, click on the Variables Button. In
the popup dialog is a list of variables that Eclipse will substitute
when running the launch config. One of the variables is String Prompt.
This allows you to enter a prompt string with a text field where the
user can enter any text. The prompt will be shown at each launch. You
can even enter default data.

The variable ${string_prompt:Enter program args:One} will cause Eclipse
to display a popup with the prompt Enter Program args on one line and a
text field filled in with One.