Java Webstart尝试将沙箱作为“Trusted-Library”

时间:2011-08-17 13:47:46

标签: java security java-web-start

我正在尝试通过Webstart加载带有未签名库的签名jar。但是,我得到“尝试打开沙盒jar作为Trusted-Library”错误。我从我的jnlp文件中删除了所有权限设置,如果让它在那里(我不喜欢),我的库得到了一个类未定义的异常。 我正在使用Netbeans使用“可信库”设置来签署我的jar。 如果我签署了图书馆(这不是我的,但是GPL),它会起作用吗?

一切都在本地工作,顺便说一下,而不是来自Webstart。 谢谢, 卡伊

清单文件:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Trusted-Library: true
X-COMMENT: Main-Class will be added automatically by build
Class-Path: lib/tools.jar
Created-By: 1.7.0-b147 (Oracle Corporation)
Main-Class: customcompile.CustomCompile

Name: customcompile/Source.class
SHA-256-Digest: WFa1FC4Q07sE3S9XxmUSEpgUKjvjYo81urGSiiLNBYY=

Name: customcompile/Output.class
SHA-256-Digest: Sc8oRhAcYYrEtWY5iA56bNKx4EuHQHgFfHmXRSYV474=

Name: customcompile/CustomCompile.class
SHA-256-Digest: WYmy6ny6BU6sYFqJCwxSUPsbTWbpvBuPurYuwnZR5sM=

Name: customcompile/MemoryClassLoader.class
SHA-256-Digest: 0bUNmC+gI7dkGFzEmDvAqdOv15UmHOQS8dDVi9FxGFU=

Name: META-INF/INDEX.LIST
SHA-256-Digest: komZP7Un7Uyi8XTq+HvpbZtNF5cfPC8TmGiPBfcO3qk=

Name: customcompile/MemoryFileManager.class
SHA-256-Digest: GorTXt3N3GZ2kUHry7qBfAOgUuYvhWHE3S+SGEjzR7k=

我也找到了关于这个主题的一些信息(http://download.oracle.com/javase/6/docs/technotes/guides/jweb/mixed_code.html): 在底部找到关于混合代码的Q& A,建议在库上设置一个懒惰模式,这对我没有任何作用。

1 个答案:

答案 0 :(得分:3)

您应该可以在Mixing Signed and Unsigned Code中找到答案。特别参见Deploying Signed Applications and Applets Securely Without a Mixed Code Warning


请注意,上面的清单有..

..
Trusted-Library: true
X-COMMENT: Main-Class will be added automatically by build
Trusted-Only: true
..

它应该是Trusted-LibraryTrusted-Only(AFAIU)中的一个或另一个。在这种情况下,它应该是Trusted-Library