?
Solved

How to provide Runtime argument to java program through Eclipse?

Posted on 2006-05-31
4
Medium Priority
?
417 Views
Last Modified: 2008-01-09
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
Comment
Question by:_Esam
4 Comments
 
LVL 2

Assisted Solution

by:appxpete
appxpete earned 100 total points
ID: 16802256
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
 

Author Comment

by:_Esam
ID: 16802695
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
 
LVL 6

Accepted Solution

by:
phuocnh earned 200 total points
ID: 16803568
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
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 100 total points
ID: 16805160
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month16 days, 14 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question