Java WebStart“强制更新”始终显示对话
我们有一个通过 Web Start 使用 JNLP 启动的应用程序,使用以下内容来确保应用程序仅使用最新代码运行:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="6.0+"
codebase="$$codebase" href="$$codebase/"app name...."jnlp">
<update check="always" policy="prompt-run"/>
<information>
<title>title....</title>
<vendor>vendor name...</vendor>
<shortcut online="true">
<desktop/>
<menu submenu="@start.menu.title@" />
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
initial-heap-size="128m"
max-heap-size="512m"
href="http://java.sun.com/products/autodl/j2se"/>
<jars....>
<properties....>
</resources>
<application-desc
name="name..."
main-class="main class....">
</application-desc>
</jnlp>
这在大多数环境中都可以正常工作,以通知更新并调用新资源的下载。然而,在一个测试环境中,每次启动应用程序时都会显示“强制更新可用..”对话框。单击“确定”按钮后,应用程序不会下载任何内容并继续正常运行。
我还没有找到任何好的文档来说明比较什么时间戳以确定更新是否可用。
还有其他人看到过这个问题或者有任何想法或信息可以分享吗?
另外,我在几个月前在 Oracle 网站上看到了一篇论坛帖子,但只有几个帖子并且没有答案。当我试图发表回复时,该网站崩溃了(这似乎是 Oracle 的常见现象......)。
We have an application that is launched through Web Start with a JNLP using the following to ensure application is run only with newest code:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="6.0+"
codebase="$codebase" href="$codebase/"app name...."jnlp">
<update check="always" policy="prompt-run"/>
<information>
<title>title....</title>
<vendor>vendor name...</vendor>
<shortcut online="true">
<desktop/>
<menu submenu="@start.menu.title@" />
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
initial-heap-size="128m"
max-heap-size="512m"
href="http://java.sun.com/products/autodl/j2se"/>
<jars....>
<properties....>
</resources>
<application-desc
name="name..."
main-class="main class....">
</application-desc>
</jnlp>
This works fine in most environments to notify of update and invoke download of new resources. However, in one test environment, the "mandatory update is available.." dialogue is shown on every launch of the application. After clicking the "OK" button though, the application downloads nothing and proceeds to run normally.
I haven't found any good documentation that tells what timestamp is being compared to determine if an update is available.
Any one else seen this issue or have any ideas or information to share?
Also, I saw a forum post on Oracle's site from a few months ago but with only a couple of postings and no answers. When I attempted to post a reply, the site went down (which seems to be a common occurrence with Oracle...).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我而言,我使用:
当我没有要更新的内容时,它可以在没有警告的情况下工作。
也许它也可以帮助你。
in my case, i used:
And it works without the warn when i don't have things to update.
Maybe it can help you too.