Passing system properties in from the command line

Warren Levy warrenl@redhat.com
Thu Jun 21 15:58:00 GMT 2001


On Thu, 21 Jun 2001, Anthony Green wrote:

> Weiqi wrote:
> > For the Sun JDK, system properties can be passed in at
> > runtime using the 'java -Dname=value Foo' command
> > line.
> > 
> > What is the equivalent for a gcj compiled executable?
> 
> Set the GCJ_PROPERTIES environment variable.
> 
> $ GCJ_PROPERTIES="name=value" Foo

Additionally, if you only want to set the property at compile time rather
than at runtime (yes, I know that's different than the original question),
you could pass the same -Dname=value sequence on the compiler command line.
--warrenl



More information about the Java mailing list