This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
duplicate class registration fix?
- From: nferrier at tapsellferrier dot co dot uk
- To: java at gcc dot gnu dot org
- Date: 04 Nov 2002 10:52:31 +0000
- Subject: duplicate class registration fix?
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