File Not Found when using Java Web Start
<p>I'm trying to use Java Web Start to replace a Java applet, but every time I run the .jnlp file either directly from the web server or directly from my computer it gives me an error.</p>

<p>I see the Java Web Start splash screen, and then the default progress bar appears. It downloads, and then verifies my jar, but shortly afterwards the following error message appears "Unable to launch the application".</p>

<pre><code>CouldNotLoadArgumentException[ Could not load file/URL specified: C:\Users\[username]\AppData\Local\Temp\tmp_cache9015150161909242571.tmp]
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\Users\[username]\AppData\Local\Temp\tmp_cache9015150161909242571.tmp (The system cannot find the file specified)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(Unknown Source)
    at java.io.FileInputStream.&lt;init&gt;(Unknown Source)
    at java.io.FileInputStream.&lt;init&gt;(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
</code></pre>

<p>I see no files in the Temp folder that look anything like tmp_cache.</p>

<p>Here is my JNLP file:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;jnlp spec="1.0+"
    codebase="http://localhost:2020/MyServer/applets"
    href="basicTest.jnlp"&gt;
    &lt;information&gt;
        &lt;title&gt;JWS Test&lt;/title&gt;
        &lt;vendor&gt;My Company&lt;/vendor&gt;
    &lt;/information&gt;

    &lt;resources&gt;
        &lt;j2se version="1.7+"
            href="http://java.sun.com/products/autodl/j2se"/&gt;
        &lt;jar href="basicTest.jar" main="true" /&gt;
    &lt;/resources&gt;

    &lt;application-desc
        name="Test Name"
        main-class="main.Entry"&gt;
    &lt;/application-desc&gt;
    &lt;update check="background"/&gt;
&lt;/jnlp&gt;
</code></pre>

<p>Things I've tried:</p>

<ul>
<li>Downloading the JNLP file and the JAR from my web server (Works as expected)</li>
<li>Using a brand new, bare-bones jar with nothing but a main method and a System.out.print() statement (Same result)</li>
<li>Changing the href inside the .jnlp file (Different error message, can't find .jar, as expected. My server logs show this correctly as a 404)</li>
<li>Changing the value of the main-class attribute (Same result, suggests that the JVM never starts)</li>
<li>Running other <a href="https://docs.oracle.com/javase/tutorial/deployment/webstart/examplesIndex.html" rel="nofollow">example apps</a> from Sun (These work correctly, either when running through the browser or when running downloaded .jnlp files)</li>
<li>Clearing my java cache and temp files (Same results)</li>
</ul>

<p>I did wonder if the jars not being fully signed would matter (my jar is currently self-signed while in development) but I would expect a different error in that case.</p>

<p>It seems as though the jar file is downloaded into one location, and verified, but then can't be found when the JVM tries to start it. Could there be a cache location conflict?</p>