1 Reply Latest reply on Oct 21, 2011 5:16 AM by guinotphil

    unable to find sun.font.FontManager

    zekela104

      How do I resolve:java.lang.NoClassDefFoundError: sun/font/FontManager errors?

       

      This exception is being thrown by a third-party jar and can also be induced adding the following to a POJO within my application.

       

      System.out.println("FontManager.class.getClassLoader: " + FontManager.class.getClassLoader().toString());

       

      Thanks in advance,

      Steve

        • 1. Re: unable to find sun.font.FontManager
          guinotphil

          The proper way is probably to create a module.

           

          Ass this file in jboss home : modules/com/sun/font/module.xml

           

          <module xmlns="urn:jboss:module:1.0" name="com.sun.font">

              <dependencies>

                  <module name="system" export="false">

                      <exports>

                          <include-set>

                              <path name="sun/font"/>

                          </include-set>

                      </exports>

                  </module>

              </dependencies>

          </module>

           

          And then in your module or WebApp which contains your third party jar, add a dependency to this module.