This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Properties
- To: java-discuss@sourceware.cygnus.com
- Subject: Re: Properties
- From: Andrew Haley <aph@pasanda.cygnus.co.uk>
- Date: 13 Sep 1999 12:43:33 -0000
> From: Kresten Krab Thorup <krab@daimi.au.dk>
> Date: 13 Sep 1999 10:37:34 +0200
>
> Anthony Green <green@cygnus.com> writes:
>
> > Jeff wrote:
> > > gcjrun -Dsomeproperty=somevalue -mx32m myapp.so MyApplication
> >
> > Tom wrote:
> > > If the class loader could load .so's, then we could just use gij for
> > > this.
> >
> > Cool - yes, exactly! We could make this work.
Unless I am missing some important point, this is way overkill. If
it's just a question of passing an attribute into an executable,
surely there's no reason environment variables shouldn't be used; it's
just a question of setting the environment variable and then launching
the executable.
For example, if you have an application on which you need to set the
heapsize, it's just (csh style)
( setenv HEAPSIZE 99 ; foo )
This solution doesn't need shared objects and is fairly portable. If
you really want a separate command to do this, it could set the
appropriate environment variables and then run the executable. It
won't work for embedded apps, but they don't usually have a command
line either.
Okay, I admit this won't work on the benighted systems where the
environment really is global.
Andrew.