duplicate class registration fix?
nferrier@tapsellferrier.co.uk
nferrier@tapsellferrier.co.uk
Mon Nov 4 02:51:00 GMT 2002
A couple of weeks ago I mentioned the duplicate class registraion
problem.
This is the issue where, if you have a nativelly compiled
class that is a duplicate of a class provided by GCJ, the runtime
won't initialize.
Instead the message:
"Duplicate class registration"
gets printed and the runtime exits.
I did some playing around and tried this:
Index: libjava/java/lang//natClassLoader.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natClassLoader.cc,v
retrieving revision 1.52
diff -r1.52 natClassLoader.cc
43a44,45
>>489c491,495
< JvFail (message);
---
> {
> return;
> // This was commented out by Nic.
> // JvFail (message);
> }
495c501
< }
---
> }
It seems to work with no ill effects. I don't want to post it as a
"fix" for this issue because it seems that a fix would be more
sensible than just ignoring the fail.
However, some other people mentioned that they disliked the way GCJ
handled this. Perhaps those people would like to try this patch with
their code and report any problems.
Perhaps someone who knows about GCJ might spot why the above would be
a bad thing to do?
Nic
More information about the Java
mailing list