SystemClassLoader and current directory
Tom Tromey
tromey@redhat.com
Thu Feb 9 16:28:00 GMT 2006
>>>>> "Thomas" == Thomas Hallgren <thomas@tada.se> writes:
Thomas> I seems the SystemClassLoader is setup to search the current directory
Thomas> by default. Is there anything I can do to prevent this? I use GCJ
Thomas> embedded with the PostgreSQL backend and the VM is initialized using
Thomas> JNI.
Try setting the java.class.path property.
You could set it to a nonexistent directory.
Alternatively you can specify your own system class loader (in 4.1 at
least) via the java.system.class.loader property.
I'm not sure how well this stuff works in libgcj when using the
invocation API.
Andrew's plan also looks pretty good.
Tom
More information about the Java
mailing list