This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant and system properties 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 » Ant, Maven and Other Build Tools
Bookmark "Ant and system properties" Watch "Ant and system properties" New topic
Author

Ant and system properties

Carl Parrish
Ranch Hand

Joined: May 03, 2002
Posts: 60
Does anyone know how to set a java system properties from within ant? To be specific I want to do the following
-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
View the Ant documentation for the java task (a built-in task). It permits nested jvmarg tasks, which are specifically described with examples in the link to command-line arguments. Note that these arguments are ignored unless the VM is forked. Here's an example from one of my projects for starting the JBoss application server:

Craig
Carl Parrish
Ranch Hand

Joined: May 03, 2002
Posts: 60
Thank you, Thank you.
I'll try that out now.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Ant and system properties
 
Similar Threads
Ant and Netbeans
Ant: print all System properties.
Passing arguments through the command line
About version.txt
Preventing output of junit*.properties