Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8251367

[windows] harfbuzz.dll not found causes failure to load sun.font.SunFontManager

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • Introduced In Version:
      16
    • Resolved In Build:
      b12

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            prr Philip Race
            Reporter:
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: