This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: libgcj/2457


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2457&database=gcc

Hi,

The Date class requires access to locale data which is loaded 
dynamically via Class.forName(). Because they are dynamically loaded the 
linker can't see the dependency on the resources when static linking - 
you must explicitly tell it to link it in somehow.

One way to do this is to put declarations like:

static Class calendar = gnu.java.locale.Calendar.class;

in the main class of your application, where "gnu.java.locale.Calendar" 
is the bundle name reported in the MissingResourceException. You can 
also add linked options to the gcj command line, but this is generally 
easier.

regards

Bryce.



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