Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes IDEs, Version Control and other tools and the fly likes How to pass parameters to a jar from eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to pass parameters to a jar from eclipse" Watch "How to pass parameters to a jar from eclipse" New topic
Author

How to pass parameters to a jar from eclipse

ujjawal rohra
Ranch Hand

Joined: Mar 20, 2010
Posts: 105
Hi All,

I need to run the command

java -DcreateSolution=true -jar abc.jar from the eclipse IDE.
How and where would I pass the parameter -DcreateSolution=true from eclipse. It will also work if I pass this parameter to my project but I can not do this also.
I can do this in cmd.


SCJP 6
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
From the menu item Run | Run Configurations. Select the Arguments tab.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Tom Reilly wrote:From the menu item Run | Run Configurations. Select the Arguments tab.


Note that the "-D" option is a VM option, not a command option, so make sure you enter the "-D" parameter in the VM arguments textarea and not the command arguments textarea!


Customer surveys are for companies who didn't pay proper attention to begin with.
ujjawal rohra
Ranch Hand

Joined: Mar 20, 2010
Posts: 105
Yes it worked...

Thanks Tim and Tom
 
wood burning stoves
 
subject: How to pass parameters to a jar from eclipse
 
Similar Threads
Applet to upload files with SCP to
Passing parameter to view in DB2
simple question for u
Issue with the exec()
using the String args[] at main