Search code examples
javajavafx-8web-deploymentjava-web-startjnlp

JavaFX Web Start failure – FailedDownloadException: Unable to load resource:


I have deployed JavaFX app to web. At local host works fine only applet. Runned from a file works both – applet and web start.

But after deploying to web server I got this exception (probably for both of them):

Ignored exception: ExitException[ 3]com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/C:/Users/Jan/AppData/Local/Microsoft/Windows/INetCache/IE/jar/myapp.jar

JNLP:

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="myapp.jnlp">
  <information>
    <title>MyApp</title>
    <vendor>MeSoft</vendor>
    <description>MyApp</description>
    <offline-allowed/>
  </information>
  <resources>
    <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="..\jar\myapp.jar" size="63799"/>
  </resources>
  <jfx:javafx-desc  width="600" height="600" main-class="myapp"  name="MyApp" />
  <update check="background"/>
</jnlp>

Solution

  • Disclaimer: I'm the maintainer of the javafx-maven-plugin.

    Please have a closer look at the jar-path: <jar href="..\jar\myapp.jar" size="63799"/>

    The problem is the href-part, because it contains backslashes which is not converted to slashes on linux-webservers.

    When using the javafx-maven-plugin, this already got reported and I have created a workaround for this, but I still need to open an issue on the java bugtracker ;)

    Even on SO this was reported: How to specify the JNLP output file when using javafx-maven-plugin for creating a javafx native installer?