Java 7u51:由于安全设置而阻止了LiveConnect(JavaScript)

时间:2014-02-27 16:11:57

标签: java applet code-signing code-signing-certificate

您可以通过打开两次.txt文件(使用双击或“编辑文档”)或按“Globe”来检查问题here。 它将不会在第二次和任何进一步的尝试中打开(在Firefox和Chrome中)。 Java控制台中只出现一个新行:

liveconnect: Security Exception: LiveConnect (JavaScript) blocked due to security settings.

证书有效:

image

以下是控制台中的奇怪行:

security: Trust for: http://...OpenDocument.jar has ended: Thu Jan 01 02:00:00 EET 1970
security: Validate the certificate chain using CertPath API
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
security: Validate the certificate chain using CertPath API

我尝试添加Application-Library-Allowable-Codebase清单属性,尝试添加时间戳。

如何满足安全约束以避免此安全性异常?

Update1:​​重新加载后,applet可以再次运行。

更新2: JRE版本1.7.0_45不存在此问题

2 个答案:

答案 0 :(得分:1)

如果您使用maven,请使用此设置

.b-hdfs__files-list {
  width: 100%;
}
.b-hdfs__files-list {
  width: auto;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-selected {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-type {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-name {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-size {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-user {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-group {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-permissions {
  width: 15px;
}
.b-hdfs__files-list .b-hdfs__files-list__item-property-col-width-date {
  width: 15px;
}
.b-hdfs__files-list__header {
  text-align: left;
  height: 32px;
  border-bottom: 1px solid #c7d0d9;
}
.b-hdfs__files-list__item {
  line-height: 32px;
  cursor: pointer;
  border-bottom: 1px solid #c7d0d9;
}
.b-hdfs__files-list__item:hover {
  background-color: #E8F1FB;
}
.b-hdfs__files-list__item-property {
  color: #494a4c;
}
.b-hdfs__files-list__item-property__name {
  font-weight: bold;
}

答案 1 :(得分:0)

通过将这些行添加到清单(感谢this answer)来修复:

Trusted-Library: true
Caller-Allowable-Codebase: *

现在清单看起来像这样:

Manifest-Version: 1.0
Trusted-Library: true
Application-Library-Allowable-Codebase: *
Application-Name: ...
Permissions: all-permissions
Caller-Allowable-Codebase: *
Main-Class: ...
Codebase: *

在Windows和MacOS环境中都解决了这个问题 security: Trust for: .jar has ended问题未解决。