Classpath vs java.class.path
Mark Wielaard
mark@klomp.org
Wed Jul 16 22:30:00 GMT 2003
Hi,
On Wed, 2003年07月16日 at 22:05, Jeff Sturm wrote:
> On 2003年7月16日, Steve Pribyl wrote:
> >
> > System.setProperty("java.class.path","/var/netfuel/lib/mysql-connector-java-3.0.8-stable-bin.jar");
>> When you reach the main() method of your program, VMClassLoader has
> already been initialized and it is probably too late to redefine
> java.class.path.
In GNU Classpath we have a application/system classloader which would
make setting that system property during runtime work
(gnu/java/lang/SystemClassLoader.java). It even tries to do intelligent
caching of the paths described by the system property.
You could integrate that with libgcj and let VMClassLoader only handle
the bootstrap classpath and then have the SystemClassLoader (with
VMClassLoader as parent) handle the user classpath (and the system
property). It is somewhere on my big list of things todo when I have
time...
Cheers,
Mark
More information about the Java
mailing list