This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: SystemClassLoader and current directory
- From: Tom Tromey <tromey at redhat dot com>
- To: Thomas Hallgren <thomas at tada dot se>
- Cc: java at gcc dot gnu dot org
- Date: 09 Feb 2006 09:23:48 -0700
- Subject: Re: SystemClassLoader and current directory
- References: <dsfi37$4u4$1@sea.gmane.org>
- Reply-to: tromey at redhat dot com
>>>>> "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