title: Where are fonts defined/installed for Openjdk Java on linux
body: <p>Installed Oracle 8 jdk on Ubuntu, within jre/lib it has various fontProperties files plus a fonts dir containing fonts. But when installed OpenJdk 8 there is no such fonts folder on font files within jre/lib.</p>
  
  <p>So where does it get its fonts from, does it come with any fonts on depen on the system having some fonts installed somewhere else.</p>
  
  <p>Update
  Based on advise from gerynix</p>
  
  <p><code>fc-list</code> </p>
  
  <p>returns no fonts</p>
  
  <pre><code>GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>java.lang.NullPointerException
          at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
          at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
          at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
          at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
          at sun.font.SunFontManager$2.run(SunFontManager.java:431)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.font.SunFontManager.&lt;init&gt;(SunFontManager.java:376)
          at sun.awt.FcFontManager.&lt;init&gt;(FcFontManager.java:35)
          at sun.awt.X11FontManager.&lt;init&gt;(X11FontManager.java:57)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at java.lang.Class.newInstance(Class.java:442)
          at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
          at sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(SunGraphicsEnvironment.java:190)
          at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:224)
          at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:252)
          at sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:94)
          at Fonts.main(Fonts.java:10)
  </code></pre>