When using fx:include's resources attribute, the FXMLLoader can end up passing a null ClassLoader to ResourceBundle which causes a NullPointerException. The following forum post has more information (I'll summarize below):
https://forums.oracle.com/message/11240449
According to the JavaDocs for Class.getClassLoader()...
Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader.
According to the JavaDocs for ResourceBundle.getBundle(...) a NullPointerException will be thrown if a null ClassLoader is provided.
http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getClassLoader()
http://docs.oracle.com/javase/7/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
Edit: I can't seem to attach files, so here is a link to a sample app that shows the issue:
https://dl.dropboxusercontent.com/u/8788282/sample-app.zip
https://forums.oracle.com/message/11240449
According to the JavaDocs for Class.getClassLoader()...
Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader.
According to the JavaDocs for ResourceBundle.getBundle(...) a NullPointerException will be thrown if a null ClassLoader is provided.
http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getClassLoader()
http://docs.oracle.com/javase/7/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String, java.util.Locale, java.lang.ClassLoader)
Edit: I can't seem to attach files, so here is a link to a sample app that shows the issue:
https://dl.dropboxusercontent.com/u/8788282/sample-app.zip
- relates to
-
JDK-8090138 Scene Builder fails to open .fxml files that use the resources attribute of fx:include.
-
- Closed
-