This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libgcj/2457
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, torsten dot rueger at firsthop dot com, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, java-prs at gcc dot gnu dot org
- Subject: Re: libgcj/2457
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Sun, 30 Sep 2001 18:12:48 +1200
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.