Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Crossposted:
http://stackoverflow.com/questions/37485210/fxml-javafx-app-run-through-jnlp-java-lang-nullpointerexception-location-is-req
https://community.oracle.com/message/13857396#13857396

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.

Exception



Main Class



Controller



FXML

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic