This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes What does the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "What does the "-D" parameter means?" Watch "What does the "-D" parameter means?" New topic
Author

What does the "-D" parameter means?

Sara El-Kady
Greenhorn

Joined: Jan 11, 2010
Posts: 14
Hi all,

This might sound pretty basic but I would like to understand what does the "-D" paramenter mean in the following line?



is there some sort of documentation that has all the other valid paramenters as well?

Thanks,
Sara
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

-D is Java's way of saying "system property." It is to show the argument goes to the VM rather than the main() method of your program.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

To expand, "D" for "Define", so "-Dname=value" constructs a name/value pair and catalogs the name in the JVM's System Properties collection. This collection is convenient as a quick-and-dirty command-line option facility (since you don't have to parse it yourself), as the place to set environment features of the JVM itself, and as a way to support options to "add-in" systems which the application doesn't need to configure itself. Things like logging options, for example.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does the "-D" parameter means?