Java Web Start - 如何清除缓存(或从用户的角度更新应用程序) [英] Java Web Start - How to clear cache (or update the app from user's perspective)

查看:194
本文介绍了Java Web Start - 如何清除缓存(或从用户的角度更新应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在浏览器中下载JNLP后,它会被缓存,因此不需要再次下载,这很好。但是,因此,如果我更新JNLP使用的JAR,用户仍会看到缓存中的应用程序的旧版本。

After the JNLP gets downloaded in the browser it becomes cached so it doesn't need to be downloaded again, which is good. However, as a consequence, if I update the JAR that the JNLP uses, users will still see the old version of the app that is in the cache.

您可以清除通过在终端中运行缓存来缓存:

You can clear the cache by running this in the terminal:

javaws -uninstall

但很明显,当您的更新准备就绪时,用户无法运行此功能。它应该更加无缝。

But obviously you could not expect from users to run this when your update is ready. It should be more seamless than that.

一个想法是更改jnlp文件名,以便下载新文件,如MyJWS-01.jnlp,以包含版本号。

One idea is to change the jnlp file name so they download new file, like MyJWS-01.jnlp, to include version numbers.

还有其他办法吗?

推荐答案

更新元素用于表示应用程序更新的首选项应由 Java Web Start 处理。默认属性值似乎是检查更新,直到超时和到总是下载更新而没有任何提示。例如,

"The update element is used to indicate the preferences for how application updates should be handled by Java Web Start." The default attribute values would seem to "to check for updates until timeout" and "to always download updates without any prompt." For example,

<update check="timeout" policy="always"/>

你得到不同的结果吗?

这篇关于Java Web Start - 如何清除缓存(或从用户的角度更新应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆