EVALUATION
Custom progress bar is implemented in Swing and to be able to show it Swing need to be initialized.
This assumes FontConfiguration object is initialized and it has following code in it:
=========
private CharsetEncoder getFontCharsetEncoder(final String charsetName,
String fontName) {
Charset fc = null;
if (charsetName.equals("default")) {
fc = (Charset) charsetRegistry.get(fontName);
} else {
fc = (Charset) charsetRegistry.get(charsetName);
}
if (fc != null) {
return fc.newEncoder();
}
if (!charsetName.startsWith("sun.awt.") && !charsetName.equals("default")) {
fc = Charset.forName(charsetName);
} else {
Class fcc = (Class) AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
return Class.forName(charsetName, true,
Thread.currentThread().getContextClassLoader());
} catch (ClassNotFoundException e) {
}
return null;
}
});
==========
On this system we end up in the last block and trying to use jnlp classloader to lookup some missing class.
Based on WFontConfiguration.getEncoding() it likely be one of
subsetEncodingMap.put("chinese-hkscs", "sun.awt.HKSCS");
subsetEncodingMap.put("dingbats", "sun.awt.windows.WingDings");
subsetEncodingMap.put("symbol", "sun.awt.Symbol");
Note that charset name we trying to resolve comes from one of the fonts installed on the system.
I.e. if system has such font then performance for web apps using lazy jars may be really bad.
Given that test system has launguage set to Chinese (PRC) i'd guess font has "chinese-hkscs" encoding but not 100% sure.
Anyway, lookup of misisng class on JNLP classloader will cause ALL jars to be loaded and nothing will be visible on the screen
because we are still initializing 2d/Swing. It seem to be 2D issue and need to be resolved in 2D code.
It seem that:
a) Thread.currentThread().getContextClassLoader() should not be used there
b) encoding handling need to be improved (does it mean we do not have correct charset support in JRE for one of chinese encodings?
seem unlikely => problem should be in the mapping code?)
Transferring to 2D team for evaluation.
|