How to overcome MissingResourceException (gnu.java.locale.Calendar)

Martin Egholm Nielsen martin@egholm-nielsen.dk
Thu Jun 10 14:53:00 GMT 2004


> That is, having the small source-file
>> public class DateTest {
> // private static Class _c = gnu.java.locale.Calendar.class;
> public static void main(String[] args) {
> System.out.println( "Date: " + new java.util.Date() );
> } // main
> } // DateTest
>> will throw a MissingResourceException when compiled with gcj-3.3 if the 
> commented statement is omitted.
I have yet another problem in relation to this, because if I try to 
compile the .o file from the .class (after uncommenting the 
Class-statement), I'll get:
Exception in thread "main" java.lang.NoClassDefFoundError: 
gnu.java.locale.Calendar not found in [file:./, core:/]
 <<No stacktrace available>>
It's been compiled like so:
$ gcj -C -d . DateTest.java
$ gcj -c -o DateTest.o DateTest.class
$ gcj -o DateTest --main=DateTest DateTest.o
Is there a difference between building .java->.o and .java->.class->.o?
Regards,
 Martin


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /