confusion when CLASSPATH includes compiled class
Per Bothner
per@bothner.com
Tue Mar 22 20:37:00 GMT 2005
Is this a known issue?
If I run a gcj-compiled application that has class Foo.java/Foo.class
compiled and linked into the executation, with a CLASSPATH that
includes Foo.class then things get really confused.
A Class.forName("Foo") will load the class in the CLASSPATH.
On the other hand other native code will reference the native-class.
I end up with a weird GC failure: the GC tries to mark a static field:
jobject val = *(jobject*) field->u.addr;
Unfortunately, the field->u.addr is null, even though field->isResolved()
is true. I fairly sure this is the field for the class loaded using the
CLASSPATH. I'm not sure when the field->u.addr is supposed to be set -
perhaps during class initialization?
Not sure if this is something to follow up on. Perhaps this isn't expected
to work until we have the new BC ABI?
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Java
mailing list