aspose file tools*
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
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: 16061
    
  21

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass parameters to a jar from eclipse