-
Bug
-
Resolution: Fixed
-
P2
-
16
With JDK 16 a jpackage installed swing app is failing with
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager
This appears to be a regression due to
8249821: Separate libharfbuzz from libfontmanager
so harfbuzz.dll is now a dependent dll of libfontmanager.dll, as
was already the case for freetype.dll
This isn't seen in apps using the java launcher, but jpackage must
not be setting up the path the same way.
I observe that in src/java.desktop/share/classes/sun/font/FontManagerNativeLibrary.java
for windows we have code like this
if (System.getProperty("os.name").startsWith("Windows")) {
System.loadLibrary("freetype");
}
System.loadLibrary("fontmanager");
along with comments about windows dll loading not being able to find
freetype without this.
The same is therefore needed for harfbuzz.
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager
This appears to be a regression due to
8249821: Separate libharfbuzz from libfontmanager
so harfbuzz.dll is now a dependent dll of libfontmanager.dll, as
was already the case for freetype.dll
This isn't seen in apps using the java launcher, but jpackage must
not be setting up the path the same way.
I observe that in src/java.desktop/share/classes/sun/font/FontManagerNativeLibrary.java
for windows we have code like this
if (System.getProperty("os.name").startsWith("Windows")) {
System.loadLibrary("freetype");
}
System.loadLibrary("fontmanager");
along with comments about windows dll loading not being able to find
freetype without this.
The same is therefore needed for harfbuzz.