jnlp - Java Web Start: How to make the system download the file every time the file changes -
i've implemented java web start application, , noticed 1 problem during programming process:
if distribute version , use jnlp file download it, cannot let system download files again unless add/delete files or clear task java cache. means if modify files system not download new file: use old ones.
i know can forbid system cache files, there better way solve more elegantly?
also note official guide:
if offline-allowed specified, java web start check see if update available. however, if application downloaded check timeout after few seconds, in case cached application launched instead. given reasonable fast server connection, lastest version of application run, not guaranteed. application, however, can run offline.
does means situation in latest version not run occur quite in practice if web slow? i.e., how fast "reasonably fast"?
thanks inputs!
you should use update element:
<jnlp> ... <update check="always" policy="always"/> ... </jnlp>
i don't know under version of java you're running app, update element introduced in java 6:
update element
the update element used indicate preferences how application updates should handled java web start. update element can contain following 2 optional attributes:
check attribute: check attribute indicates preference when jnlp client should check updates, , can have 1 of 3 values: "always", "timeout", , "background" value of "always" means check updates before launching application. value of "timeout" (default) means check updates until timeout before launching application. if update check not completed before timeout, application launched, , update check continue in background. value of "background" means launch application while checking updates in background.
policy attribute: policy attribute indicates preference how jnlp client should handle application update when known update available before application launched, , can have 1 of following 3 values: "always", "prompt-update", , "prompt-run" value of "always" (default) means download updates without prompt.
Comments
Post a Comment