使用Glassfish 4.1和Java7签署Java Web Start应用程序 [英] Signed Java web start application with Glassfish 4.1 and Java7

查看:101
本文介绍了使用Glassfish 4.1和Java7签署Java Web Start应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试运行带有GlassFish 4.1,本地JDK 1.7 update 51的web start应用程序,并且遇到由安全设置阻止的应用程序消息。

是我试图让它工作:


1.增加了 http:/ /hostname.localdomain.com:8080 到Java控制面板中的例外站点列表。还尝试了 http://hostname.localdomain.com:8080/___JWSappclient/ http://hostname.localdomain.com:8080/clientName.jnlp




2.从Glassfish的keystore.jks导出s1as密钥并将其导入JRE cacerts:

$ keytool -exportcert -keystore keystore.jks -alias s1as -file server.csr
$ keytool -importcert -keystore jre / lib / security / cacerts -alias s1as -file server.csr



我可以看到用s1as键签名的罐子,但是javaws仍然抱怨。
Glassfish自动使用sun-application-client.xml中的设置生成JNLP。



感谢有关如何解决此错误的任何帮助。如果我在客户端使用JRE7更新21,我意识到这可以正常工作,但我想稍后尝试使用Java 8,所以无法坚持到Java 7.如果有问题,我使用的是Ubuntu。

解决方案

我已经复制了您的问题并且有一个解决方法。

看起来问题与glassfish 4.1会自动生成jnlp文件和新的Java安全jdk 1.7 u 25或更高版本。

如果您安装java 1.7.0_21或更低版本,Java Web Start应用程序将启动通过使用早期发行版中的javaws。



我使用netbeans 8.0.2,java 1.8_31和GF 4.1简化了这个问题。我创建了一个没有代码更改的Java EE企业应用程序客户端。部署它,你不能从glassfish控制台运行它,也不能从7.1 u25或更高版本运行任何javaws。但是,如果您从命令行使用javaws 7.1 u21或更早版本,它将启动。 有趣的是,该应用程序运行在Java 1.8 u31环境中。



必须是玻璃鱼的错误。


I am trying to run a web start application with GlassFish 4.1, JDK 1.7 update 51 locally and I encountered the "Application Blocked by Security Settings" message.

Here is what I tried to make it work:
1. Added http://hostname.localdomain.com:8080 to the Exception Site List in Java control panel. Also tried http://hostname.localdomain.com:8080/___JWSappclient/ and http://hostname.localdomain.com:8080/clientName.jnlp


2. Exported the s1as key from Glassfish's keystore.jks and imported it in to JRE cacerts: $ keytool -exportcert -keystore keystore.jks -alias s1as -file server.csr $ keytool -importcert -keystore jre/lib/security/cacerts -alias s1as -file server.csr

I could see the jars signed with the s1as key, but javaws still complains. The JNLP is generated by Glassfish automatically using the settings from our sun-application-client.xml

Appreciate any help on how to get around this error. I realize this works fine if I use JRE7 update 21 on the client-side but I would like to try with Java 8 later on so cannot stick to Java 7. If it matters, I am using Ubuntu.

解决方案

I have replicated your problem and have a workaround.

It seems the problem is related to the glassfish 4.1 automatically generated jnlp file and the new java security jdk 1.7 u 25 or later.

If you install java 1.7.0_21 or earlier your Java Web Start Application will start by using the javaws in the earlier distribution.

I have simplified this problem using netbeans 8.0.2, java 1.8_31 and GF 4.1. I created a Java EE "Enterprise Application Client" with no code changes. Deploy it and you cannot run it from the glassfish console nor any javaws from 7.1 u25 or later. However, if you use javaws 7.1 u21 or earlier from the command line it will start. Interestingly, the application is running in a java 1.8 u31 environment.

Must be a bug in glassfish.

这篇关于使用Glassfish 4.1和Java7签署Java Web Start应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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