This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]