问题
My JNLP file is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="http://fuuu.sk/" href="launch.jnlp" spec="1.0+">
<information>
<title>PocketBrain</title>
<vendor>zatokar</vendor>
<homepage href="www.fuuu.sk"/>
<description>PocketBrain</description>
<description kind="short">PocketBrain</description>
</information>
<update check="always" policy="always"/>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.7+"/>
<jar href="PocketBrain.jar" main="true"/>
<jar href="lib/sqlite-jdbc-3.7.2.jar"/>
<jar href="lib/eclipselink.jar"/>
<jar href="lib/javax.persistence_2.1.0.v201304241213.jar"/>
<jar href="lib/jcalendar-1.4.jar"/>
<extension href="jnlpcomponent1.jnlp"/>
</resources>
<application-desc main-class="model.BrainInPocket">
</application-desc>
</jnlp>
And as you can see there is update="always policy="always" as it is written in Java web start help. But it does not help it is showing still the same error even though it is removed (and i am sure it should show different error). Helping is only deleting cached files in java control panel. WHY it is not updating automaticaly? For test was used IE 7 because in other browsers it automaticaly download the jnlp file.
回答1:
1.) Change (meaning switch) the order of the <update> and the <security> tags. For analysis of your JNLP file use JaNeLa.
2.) Version your jars in your applet tag with each build / deploy. This will force a reload.
<jar href="lib/sqlite-jdbc-3.7.2.jar"/> -> <jar href="lib/sqlite-jdbc-3.7.3.jar"/>
I know this is cumbersome for external libs...
3.) You may also try the version tag:
Rename your jar files to: sqlite-jdbc__V3.7.2.jar
<jar href="lib/sqlite-jdbc.jar" version="3.7.2"/>
来源:https://stackoverflow.com/questions/20220293/jnlp-is-not-updated-even-though-there-is-update-always-policy-always