• Post Reply Bookmark Topic Watch Topic
  • New Topic

FXML JavaFX app run through JNLP java.lang.NullPointerException: Location is required  RSS feed

Petr Omáčka
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I try to deploy JavaFX FXML app as Web Start but I have got exception bellow. Jar is normaly working and also works deployed as self-contained app. I have build project in NetBeans v. 8.0.2. I have found so many similar threads over internet but either solution works nor I was thinking that solution is the right one.

In all solution has been identified this row

SomeClass root = FXMLLoader.load(getClass().getResource("someFXML.fxml"));

as a cause.

Solutions was:

1. Use path /someFXML.fxml.
2. Use FXMLLoader.load(getClass().getClassLoader().getResource("someFXML.fxml"));
3. Use FXMLLoader.load(getClass().getClassLoader().getResource("packageName/someFXML.fxml"));
4. Checks for files presence.
5. Signing the jar.

I have tried perhaps all of them.

I am thinking that the solution not depends on row shown.


Main Class



  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!