MissingResourceException with Date under mingw port
Per Bothner
per@bothner.com
Wed Apr 10 18:21:00 GMT 2002
> Eric> static
> Eric> {
> Eric> gnu.java.locale.Calendar c = null;
> Eric> }
I don't particularly care for this approach.
The correct general solution is to support some option
to specify classes that should be loaded. The gcj
wrapper can easily mangle this into a '-u' linker option.
I don't understand how forcing gnu.java.locale.Calendar
to get loaded really helps since you're don't know which
locale you will need. However, I suggest the following:
Add a static method to gnu.java.locale.Calendar:
public static ResourceBundle getBundle(Locale locale)
{
// This can possibly be optimized.
return getBundle("gnu.java.locale.Calendar", locale);
}
and in Date.java replace getBundle calls:
ResourceBundle rb = ResourceBundle.getBundle(bundleName, locale);
by:
ResourceBundle rb = gnu.java.locale.Calendar.getBundle(locale);
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Java
mailing list