• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

How to provide Runtime argument to java program through Eclipse?

Hi,
I need to know how do I give a runtime argument to a java program while using Eclipse?

Like I know - using the command line I can give java myCompiledClass theArgument

How do I do the same thing with Eclilpse???

I had done it earlier but now forgot :)

Thax...
_Esam
0
_Esam
Asked:
_Esam
3 Solutions
 
appxpeteCommented:
On the "Run" dialog where you give it the name of your startup class there is a tab for arguments.

I get to this tab by clicking the down arrow next to the Run toolbar icon and select the "Run..." menu item.
0
 
_EsamAuthor Commented:
OK,
From   Run >> Arguments >> Then ??

There are two text boxes/options ---- Program Arguments and VM Arguments?

Do I simply provide the argument value there in the Program Argument???

That's it?


_Esam
0
 
Nguyen Huu PhuocSenior ManagerCommented:
Yes
If you want to give program arguments you put it in "program arguments" textbox
Take example
java abc.abd.yourClass -h -m 50
"-h -m 50" are your program arguments.
java -Djava.xml.XMLParserFactory=org.dom4j.DOMXMLParser  abc.abd.yourClass
"-Djava.xml.XMLParserFactory=org.dom4j.DOMXMLParser " is VM argument.
Phuoc
0
 
Mayank SAssociate Director - Product EngineeringCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now