How to overcome MissingResourceException (gnu.java.locale.Calendar)
Tom Tromey
tromey@redhat.com
Thu Jun 10 17:02:00 GMT 2004
>>>>> "Martin" == Martin Egholm Nielsen <martin@egholm-nielsen.dk> writes:
Martin> // private static Class _c = gnu.java.locale.Calendar.class;
Martin> (after uncommenting the Class-statement)
Martin> Is there a difference between building .java->.o and
Martin> .java->.class->.o?
Yes. There is no way to directly represent "foo.class" in Java
bytecode. Instead Java compilers generate a synthetic method that
uses Class.forName() to find the class. This means that when you
compile the .class to .o, you no longer have a direct reference to the
symbol.
I don't think you said what platform you're on. If you can I highly
recommend using dynamic linking instead of static linking. That will
fix all these difficulties.
Tom
More information about the Java
mailing list