Running command line argument file with Eclipse. [message #18126] |
Thu, 27 January 2005 10:15 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: untz.hotmail.com
Suppose you write a program that's expecting a file (my situation is an
xml file), to be args[0] in your code... I know that I can build an Ant
build script, but what I am asking for is how do I set eclipse up so I
could run the file using "Run as Java Application"?
I keep getting: <usage> java myclassfile filename.xml in the console.
Does anyone understand what I am trying to get at?
|
|
|
Re: Running command line argument file with Eclipse. [message #18161 is a reply to message #18126] |
Thu, 27 January 2005 12:25 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: myersj.nospam.gmail.com
Unnsse,
In Eclipse, pull down the Run menu and choose Run... Select an existing
run configuration for your Java Application or create a new one. Switch
to the Arguments tab of the run configuration and add your arguments in
the Program Arguments text box, and then press Run.
Hope this helps,
- Jeff
Unnsse Khan wrote:
> Suppose you write a program that's expecting a file (my situation is an
> xml file), to be args[0] in your code... I know that I can build an Ant
> build script, but what I am asking for is how do I set eclipse up so I
> could run the file using "Run as Java Application"?
> I keep getting: <usage> java myclassfile filename.xml in the console.
>
> Does anyone understand what I am trying to get at?
>
|
|
|
Re: Running command line argument file with Eclipse. [message #19215 is a reply to message #18161] |
Fri, 28 January 2005 01:09 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: untz.hotmail.com
I tried that with a file prompt which pointed to the xml file and it still
doesn't work at runtime... How do you configure eclipse to always run the
standalone Java application (which includes the 'public static void main
(String args[])') to run against a args[0] file?
Also, what is the *BEST* XML plugin in the market for Eclipse?
Thanks for your help,
Unnsse
Jeff Myers wrote:
> Unnsse,
> In Eclipse, pull down the Run menu and choose Run... Select an existing
> run configuration for your Java Application or create a new one. Switch
> to the Arguments tab of the run configuration and add your arguments in
> the Program Arguments text box, and then press Run.
> Hope this helps,
> - Jeff
> Unnsse Khan wrote:
>> Suppose you write a program that's expecting a file (my situation is an
>> xml file), to be args[0] in your code... I know that I can build an Ant
>> build script, but what I am asking for is how do I set eclipse up so I
>> could run the file using "Run as Java Application"?
>> I keep getting: <usage> java myclassfile filename.xml in the console.
>>
>> Does anyone understand what I am trying to get at?
>>
|
|
|
Powered by
FUDForum. Page generated in 0.07486 seconds