This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libgcj/10172: System.properties cannot be given with '-Dmyprop=myvalue'
- From: Jeff Sturm <jsturm at one-point dot com>
- To: mriekkinen at yahoo dot com
- Cc: gcc-gnats at gcc dot gnu dot org, <gcc-prs at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>, <java-prs at gcc dot gnu dot org>
- Date: Thu, 20 Mar 2003 15:40:20 -0500 (EST)
- Subject: Re: libgcj/10172: System.properties cannot be given with '-Dmyprop=myvalue'
On 20 Mar 2003 mriekkinen at yahoo dot com wrote:
> Code written so, that it prints a System property 'name' into console
> prints just null.
> > ./HelloWorld -Dname=mcr70
>
> It results in:
> HelloWorld null
That usage isn't supported. The `-D' argument is intended to be used with
the gcj compiler, as in:
gcj -Dname=mcr70 HelloWorld.java --main=HelloWorld -o HelloWorld
Or you can use the gij bytecode interpreter:
gij -Dname=mcr70 HelloWorld
For natively compiled code you may also set the GCJ_PROPERTIES environment
variable:
env GCJ_PROPERTIES=name=mcr70 ./HelloWorld
Let me know if any of these don't work for you.
Jeff