GCJ Windows and SWT

Bryce McKinlay bryce@mckinlay.net.nz
Tue Sep 23 22:12:00 GMT 2003


On Tuesday, Sep 23, 2003, at 15:36 Pacific/Auckland, JR Ruggentaler 
wrote:
> Ok I found the problem. I am statically linking my app and it uses
> java.util.Date which references gnu.java.locale.Calendar causing this
> exception:
>> Failed to execute runnable (java.util.MissingResourceException: Bundle
> gnu.java.locale.Calendar not found)
>> I found a post (http://gcc.gnu.org/ml/java/2002-04/msg00184.html) that
> suggest some workarounds. Is this a documented bug or feature request? 
> I ask
> because things seem to get fixed very quickly but the message I site is
> almost 1.5 years old.

This isn't fixed because it isn't really a bug: the linker simply 
doesn't have any way of knowing about all the classes your application 
might possibly load using reflection.
When the new bc-abi is done, one possible way to improve static linking 
might be a runtime mechanism that dumps out a list of all the classes 
that are actually loaded/used by your application. You would then feed 
this list back into the compiler to produce a static binary which 
contains the smallest set of classes it needs to run (perhaps this 
could even work at the method level). You'd still have to be careful to 
include, for example, all the locales that users of your app might 
need, so this would be a fairly labour intensive process.
Ultimately, though, libgcj will be built as a DLL on windows, and this 
will be the simplest and most robust way to use it.
Regards
Bryce.


More information about the Java mailing list

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