This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
setting property...
Posted by Mukul on January 22, 2002 at 3:14 AM
> Hi, > I want to know why sometimes we need -d option when executing java class from comand prompt? Is there any other way to handle it? I have a java class which I need to run from command prompt as: > C:/>java -DVicuna=c:\vicuna DisplayInfo > If I ommit -DVicuna, the application does not run. Why? Is there any other way? > Thanks, > Avijit When you use -D, you are basically setting a system property, in your case setting a property by the name Vicuna with a value c:\vicuna.
The reason your program does not work when you omit -D is because the property being looked for by your program is not found.
Replies:
|