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

查看:14
本文介绍了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"/>

你得到了不同的结果吗?

Are you getting a different result?

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

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