Name: jk109818 Date: 03/18/2003
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OPERATING SYSTEM VERSION :
Windows NT Version 4.0
A DESCRIPTION OF THE PROBLEM :
There is a problem with the way that the UIdefaults class
Broadly, some application code is running in
classloader A. If the application code calls
ResourceBundle.getBundle, then there is some magic
code in ResourceBundle that determines that the
caller is in classloader A and ResourceBundle then
uses ClassLoader A to find the resource bundle.
However, if the app code calls addResourceBundle(), then
calls one of UIDefaults methods to get a UI resource from
the added resource bundle, such as using the get(Object
key, Locale locale) method. The UIDefaults class will then
call ResourceBundle.getBundle, then the ResourceBundle
code will see that the call is coming from code
using the system classloader, and will use the
system classloader (rather than classloader A)
to find the bundle.
For apps started by JavaWebStart, the app is running with
its resources in a different classloader than the system
classloader. And thus the problem occurs.
I think a solution similar to the one developped for bug ID
4418820 should be used.
This bug can be reproduced always.
CUSTOMER WORKAROUND :
One could always try to load the resource bundles for the
appropriate locale and add the content of the resource
bundles to the UIDefaults class using put() or putDefaults
(Review ID: 179181)