Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Running command line argument file with Eclipse.
Running command line argument file with Eclipse. [message #18126] Thu, 27 January 2005 10:15 Go to next message
Eclipse UserFriend
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 messageGo to next message
Eclipse UserFriend
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
Eclipse UserFriend
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?
>>
Previous Topic:Where is the Eclipse icon file ?
Next Topic:Install on Windows Terminal Server
Goto Forum:
  


Current Time: Mon Feb 10 21:35:07 GMT 2025

Powered by FUDForum. Page generated in 0.07486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top