JRE 8u171无法使用Java Web Start脱机模式 [英] Java Web Start Offline mode not possible with JRE 8u171
问题描述
有人还会使用Java Web Start吗?好吧,我确实必须这样做.
Does anyone still uses Java Web Start? Well I certanly have to.
我有一个需要在联机和脱机模式下运行的应用程序.在线获取更新,但实际用例处于离线状态.
I have an application that needs to run in online and offline mode. Online for getting updates, but the actual use case is offline.
直到运行良好的jre8u161为止.但是使用当前的171和172更新时,该应用程序将无法以脱机模式启动.
Up to jre8u161 that worked fine. But with the current Updates 171 and 172 the application won't start in offline mode.
如果使用Java Cache Viewer将其强制为脱机模式,则会出现异常:
If I force it to offline mode with the Java Cache Viewer I get the exception:
com.sun.deploy.net.FailedDownloadException: Ressource kann nicht heruntergeladen werden. System ist offline. (Resource can not be downloaded. System is offline.)
at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.model.ResourceProvider.getResource(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
at com.sun.javaws.Launcher.prepareResources(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
如果我以javaws -offline <jnlp-file>
开头,则会收到消息离线状态下的应用程序"(不提供离线模式下的应用程序).
If I start it with javaws -offline <jnlp-file>
I get the message "Anwedung im Offlinebetrieb nicht verfügbar" (Application in offline mode not available).
我使用此jnlp文件创建了一个最小的应用程序:
I created a minimal application with this jnlp-file:
<jnlp spec="7.0" codebase="<URL>" href="<jnlp-file>"
<information>
<title>Base Test</title>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<jar href="<jar-file>"/>
</resources>
<application-desc main-class="test.BaseTest"/>
</jnlp>
但这也不会在离线模式下开始.
But this also won't start in offline mode.
我还能做什么?
推荐答案
这是JDK 8 171的已知错误 https://bugs.openjdk.java.net/browse/JDK-8203272
This is a know bug of JDK 8 171 https://bugs.openjdk.java.net/browse/JDK-8203272
这在更高版本的JAVA中已修复(可以使用Java 10在脱机模式下启动jnlp)
This is fixed in later version of JAVA (able to launch jnlp in offline mode with java 10 )
无法通过8-171 Java更新以离线模式启动JNLP.
There is no way to launch JNLP in off line mode with 8-171 java update.
桌面快捷键启动 解决的方法之一是(这只是一个hack) 1.创建2个不同的jnlp,一个用于Java 8-171,另一个用于在离线模式下为其他Java版本启动jnlp.
FOR DESKTOP SHORTCUT LAUNCH One of the work around would be(It is just a hack) 1. create 2 different jnlp one for java 8-171 and another for launch jnlp in offline mode for other java versions.
- 创建一个启动器jnlp应用程序,该应用程序可在客户端本地上检测Java版本并启动相应的jnlp.
(我目前正在研究它,完成后将更新代码)
(I am current working on it will update code when done)
在JNLP中使用此配置
USE this config in JNLP
JAVA 8171
JAVA 8 171
<offline-allowed/>
<shortcut>
<desktop/>
</shortcut>
JAVA OTHER版本
JAVA OTHER version
`<offline-allowed/>
<shortcut online="false">
<desktop/>
</shortcut>`
这篇关于JRE 8u171无法使用Java Web Start脱机模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!