Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPE on javafx applications on MAC

This is quite an annoying bug that was - supposed to be - fixed already ( I did some research), but the problem persists on my mac.

I have a simple javaFX application with a button that when clicked on should print hello world. The button itself has some text in it. However, when the application runs, it gives this error:

Caused by: java.lang.NullPointerException
at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99)

(full exception here: http://pastebin.com/YdAgMfPs)

How could this be solved? Mac is on most recent version ( OS X el capitan) and java aswell. I'm using netbeans IDE, but can be reproduced on other IDE's aswell, so I think the problem lies with my machine

like image 999
wimdetr Avatar asked Mar 09 '16 14:03

wimdetr


1 Answers

I've found a solution to this problem. I opened the font book app and restored standard fonts. That did the trick.

Source : https://bugs.openjdk.java.net/browse/JDK-8089900

like image 155
wimdetr Avatar answered Nov 14 '22 07:11

wimdetr