java web start jnlp apache https web服务器上的Java安全性阻止了应用程序

时间:2015-10-06 04:48:04

标签: java apache java-web-start jnlp

我在安全的apache http服务器上有一个JNLP / Web Start应用程序(没有Tomcat - 我需要吗?)。它已经与我用java生成的免费密钥库签名。当我启动它时,我收到以下错误:

  

为了安全起见,应用程序现在必须满足High的要求   或非常高的安全设置,或成为异常站点列表的一部分,   被允许跑。

我已将位置添加到异常站点列表(带有斜杠以包含所有子目录和文件)但我仍然会收到此错误。

当然它在Chrome中不起作用。我尝试从命令行启动jnlp文件,从Firefox和Internet Explorer启动URL,它们都给我同样的错误。

我已获得证书并签署了我的jar文件。我在jar文件上运行了jarsigner -verify,所有内容都按顺序查看(但我不确定我在寻找什么):

 jarsigner -verify -verbose -keystore garageMonitor.jks ../GarageMonitorFinder.jar

s k     1561 Fri Oct 09 18:19:48 UTC 2015 META-INF/MANIFEST.MF
        1425 Fri Oct 09 18:19:50 UTC 2015 META-INF/8D95B904.SF
        8149 Fri Oct 09 18:19:50 UTC 2015 META-INF/8D95B904.RSA
           0 Fri Oct 09 14:13:14 UTC 2015 META-INF/
           0 Fri Oct 09 14:13:14 UTC 2015 com/
           0 Fri Oct 09 14:13:14 UTC 2015 com/thompco/
           0 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/
smk      107 Fri Oct 09 14:13:12 UTC 2015 META-INF/INDEX.LIST
smk     1128 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitor.class
smk     2320 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorBroadcastClient.class
smk     3631 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorFinder.class
smk      903 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorGui$1.class
smk      903 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorGui$2.class
smk      903 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorGui$3.class
smk      822 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorGui$4$1.class
smk      954 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorGui$4.class
smk     8192 Fri Oct 09 14:13:14 UTC 2015 com/thompco/garagemonitor/GarageMonitorGui.class

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.

当我尝试运行jnlp文件时,我仍然遇到上述错误。有什么方法可以解决这个问题吗?

无论如何都要进行故障排除/调试吗?

2 个答案:

答案 0 :(得分:2)

好的,把我剩下的头发拉出后,我偶然发现this thread。原来你:

  

转到您的java控制面板和设置...取消选中'保持临时状态   我的电脑上的互联网文件'。应用更改并再次尝试.jnlp

它有效!好吧,它做到了。一次。

我后来发现这个非常有用的JNLP调试器来自Andrew Thompson(没有关系),叫做JaNeLa。它最初托管的网站已关闭,但AlBundy(我们认为他只是一名鞋子推销员)把它放在github上here 事实证明它非常容易使用:只需运行jar并将其指向URL或文件(URL更好。)

答案 1 :(得分:0)

对我来说,转向Java 8后,我看到了同样的错误。对我来说,解决方案是添加:

Permissions: all-permissions

到罐清单。有关更多信息,请参见this oracle blog和有关Permissions Attribute的信息。 (似乎Java 7需要Permissions属性,但是直到我开始使用Java 8时,这对我来说才不是问题。)