Reputation: 61
And many thanks to all who will take time for reading.
I'm struggling to make a webstart Swing 1.4.2_12 application to launch with java webstart 1.6.0_29.
Here is the scenario :
The following message is reported:
CouldNotLoadArgumentException[ Could not load specified file/URL : C:\DOCUME~1\BENOIT~1.VAT\LOCALS~1\Temp\javaws2]
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Full stacktrace is:
java.io.FileNotFoundException: C:\DOCUME~1\BENOIT~1.VAT\LOCALS~1\Temp\javaws2 (File not found)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(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$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Both the following HTTP headers are sent to the client by JNLP servlet :
Cache-Control : empty
Pragma : empty
These headers are necessary to prevent IE to disable caching in HTTPS mode wich prevents java webstart to find the loaded jnlp file (because it is not cached).
Mime-type is set to : application/x-java-jnlp-file
What I do not understand is why java 1.4.2_12 cannot find the jnlp file loaded by JWS 1.6.0_29 ?
Thanks for reading.
Upvotes: 3
Views: 2589
Reputation: 61
@Andrew : Thank you for your interest.
Here comes my conclusions on that issue.
In a nutshell : Always set the href attribute in the the jnlp tag !
<jnlp spec="1.0+" codebase="htt://myhost/codebase" href="mustSetThisAbsolutelyForJWS-1.4.2_12.jnlp">
...
</jnlp>
Multiple HTTP debug sessions have shown that :
Please note : When using JWS 1.4 or 1.5 with this scenario, the application WILL start. The issue only appears when JWS 1.6 is used to run a 1.4.2_12 application. JWS 1.5 and 1.6 do not fail when no href attribute is set. Instead they simply use the JNLP as is, check the JAR updates and then launch the application.
It's been a major pain in the neck for me and took me days to figures this out. Hope this will help someone one day.
Upvotes: 1