我有一个JNLP应用程序,由于证书过期需要更新。我有一个由CA验证的新证书。我已将新证书导入我的密钥库 - 我已导入完整的证书链。
我的构建文件在我的构建中标记和加盖时间戳
<signjar alias="myAlias"
keystore="myKeystore"
storepass="storepass"
keypass="keypass"
lazy="false"
tsaurl="http://timestamp.globalsign.com/scripts/timestamp.dll">
<path>
<fileset dir="${app.dist.dir}" includes="**/*.jar" />
</path>
</signjar>
编译后我可以使用jarsigner验证jar文件。一切都检查好,“jar验证”没有任何警告。
使用Java 6进行编译并使用类似的
运行应用程序"C:\Program Files\Java\jdk1.6.0_38\bin\javaws.exe" -verbose start.jnlp
工作正常。 Popup告诉我应用程序已经过适当的认证。我可以查看证书,看起来一切都很好。
使用Java 7进行编译并使用类似的东西运行应用程序
"C:\Program Files\Java\jdk1.7.0_51\bin\javaws.exe" -verbose start.jnlp
失败。 “Java安全设置阻止了此应用程序的运行。您可以在Java控制面板中更改此行为”
我已尝试将安全设置下移到中等但这不起作用,对我来说不可行,因为此应用程序可在互联网上使用。
我尝试在Java 6中编译并在Java 7中运行,结果相同。
我没有收到任何错误消息。我已经在这几个小时了,在解除了许多问题和警告之后,我现在完全陷入了困境。我已经附加了JNLP文件,它有帮助!
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="6.0" codebase="http://localgocommunicate1.x.accessacloud.com:8080/a/theaccessgroup.com" href="http://localgocommunicate1.x.accessacloud.com:8080/a/theaccessgroup.com/client/desktop/start.jnlp">
<information>
<title>My App</title>
<vendor>Company Ltd</vendor>
<homepage href="http://www.myApp.com"/>
<description>My App</description>
<description kind="short">My App</description>
<icon href="http://localhost:8080/desktopclient/images/icon.gif"/>
<icon kind="splash" href="http://localhost:8080/desktopclient/images/splash.gif"/>
<offline-allowed/>
<shortcut online="true">
<menu submenu="Startup"/>
<menu submenu="My App"/>
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<update check="timeout" policy="always"/>
<!-- Global Resource -->
<resources>
<j2se version="1.7*" java-vm-args="-Xmx32m" max-heap-size="32m" href="http://java.sun.com/products/autodl/j2se"/>
<!-- App Common Resources -->
<jar href="http://localhost:8080/desktopclient/6/myappclient.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/myappshared.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/myappclient.resources.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/myapplibrary.jar" download="eager"/>
<!-- Common Resrouces -->
<jar href="http://localhost:8080/desktopclient/6/lib/commons-logging-1.1.3.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/log4j-1.2.17.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-beanutils-1.9.1.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-codec-1.9.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-collections-3.2.1.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-digester-2.1.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-fileupload-1.3.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-httpclient-3.1.jar" download="eager"/>
<jar href="http://localhost:8080/desktopclient/6/lib/commons-io-2.4.jar" download="eager"/>
<!-- JNA -->
<jar href="http://localhost:8080/desktopclient/6/lib/jna-4.0.0.jar"/>
</resources>
<!-- OS Specific Resources -->
<resources os="Windows" arch="x86" href="http://java.sun.com/products/autodl/j2se">
<jar href="http://localhost:8080/desktopclient/6/swt/swt-ws-win32-win32-x86.jar" />
</resources>
<resources os="Windows" arch="x86_64" href="http://java.sun.com/products/autodl/j2se">
<jar href="http://localhost:8080/desktopclient/6/swt/swt-ws-win32-win32-x86_64.jar" />
</resources>
<resources os="Windows" arch="amd64" href="http://java.sun.com/products/autodl/j2se">
<jar href="http://localhost:8080/desktopclient/6/swt/swt-ws-win32-win32-x86_64.jar" />
</resources>
<resources os="Mac OS X" arch="x86_64" href="http://java.sun.com/products/autodl/j2se">
<j2se version="1.6+" java-vm-args="-XstartOnFirstThread"/>
<jar href="http://localhost:8080/desktopclient/6/swt/swt-ws-cocoa-macosx-x86_64.jar" />
</resources>
<application-desc main-class="myappclient.Client">
<argument>-version</argument>
<argument>6</argument>
</application-desc>
</jnlp>
任何帮助非常感谢
答案 0 :(得分:0)
好的,我有一个适合我的解决方案。
更新JNLP文件以强制实施Java 1.7
&LT;资源&GT;
&lt; j2se version =“1.7 *”java-vm-args =“ - Xmx32m”max-heap-size =“32m”href =“http://java.sun.com/products/autodl/j2se”/&gt;