I'm trying to package my application as a Web Start usign the ZenJava plugin for Maven.
mvn -pl XXX com.zenjava:javafx-maven-plugin:web -DskipTests -DmainClass=XXX.Main -Dproject.organization.name=XXX -DkeystoreAlias=selfsigned -DkeyStorePassword=XXX -DallPermissions=true -DkeyStore=./keystore.jks
This produces the following artifacts:
/lib
XXX-jfx.jar
XXX.html
XXX.jnlp
If I start my application from the jar, everything works as expected, but if I start the jnlp I get a NPE regarding the Location like the one in this topic.
What I'm using to read the required resource is
Thread.currentThread().getContextClassLoader().getResource("relative/path/from/package/root")
Tried all different ways to load it described in the linked topic without success. What am I missing? Doesn't the working jar mean my class loading is correct? Here's the important part of the JNLP as well.
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="XXX-0.0.1.jnlp">
  <information>
    <title>Sample JavaFX Application</title>
    <vendor>XXX</vendor>
    <description>Sample JavaFX 2.0 application.</description>
    <offline-allowed/>
  </information>
  <resources>
    <jfx:javafx-runtime version="8.0+" href="http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp"/>
  </resources>
  <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="xxx-jfx.jar" size="44875" download="eager" />
    <!-- Bunch of other jars here -->
  </resources>
  <applet-desc  width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback"  name="XXX-0.0.1" >
    <param name="requiredFXVersion" value="8.0+"/>
  </applet-desc>
  <jfx:javafx-desc  width="800" height="600" main-class="XXX.Main"  name="XXX-0.0.1" />
  <update check="background"/>
</jnlp>
Let me know if you need more information.
Thanks in advance.
 
    