GCJ not using java.lang.Exception in libgcj.jar??

Bryce McKinlay bryce@albatross.co.nz
Sat Jan 27 15:36:00 GMT 2001


"Kevin A. Burton" wrote:

> Could this be the problem?  java.lang.Exception under GCJ is native and
> contained in libgcj.so?  If so this is strange... I can't see any advantage to
> doing this and I think it might be a Bad Thing.  There might be a speed
> advantage!?

All classes in libgcj are compiled as native and included in libgcj.so. That is pretty
much the whole point.

Think of all native classes as being loaded by the same "system" classloader, and think of
bytecode classes as being run by a different, interpreter class loader. If a class is
compiled against a java.lang.Exception, you can not then replace the java.lang.Exception
with a different, bytecode version. Different classes with the same name could exist in
different classloaders, but would not be cross-assignable.

So, basically you need to copy your modified class into the libgcj source tree and rebuild
libgcj.so as well as libgcj.jar.

regards

  [ bryce ]




More information about the Java mailing list