tags:

views:

289

answers:

2

I am developing on Eclipse on Windows and Code gets deployed on Unix. I am fething the system property values using System.getProperty("key") ... how do I pass this in Eclipse so that I do not have to modify the code and it works on Eclipse for debugging?

Any suggestions?

+7  A: 

Run -> Run configurations, select project, second tab: “Arguments”. Top box is for your program, bottom box is for VM arguments, e.g. -Dkey=value.

Bombe
works! Thanks :)
Devang Kamdar
+1  A: 

You can add command line arguments to your run configuration. Just edit the run configuration and add -Dmyprop=value (or whatever) to the VM Arguments Box.

izb
If you meant "Program Arguments box" when you said "command-line args box" under Arguments tab - Does not Work!Has to be entered in "VM Arguments Box" as mentioned by Bombe above.
Devang Kamdar
Thanks, and updated.
izb