JAR清单代码库不匹配

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JAR清单代码库不匹配相关的知识,希望对你有一定的参考价值。

我在dropbox中托管了一个applet,在droppages中有一个链接。小程序是自签名的。遵循代码

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.1
X-COMMENT: Main-Class will be added automatically by build
Class-Path: lib/GammingImage.jar lib/SolomonKingdomResources.jar
Permissions: all-permissions
Created-By: 1.7.0_45-b18 (Oracle Corporation)
Codebase: ...(etc)

JNLP

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="" href="launch.jnlp" spec="1.0+">
  <information>
    <title>SolomonKingdom</title>
    <vendor>Usuario</vendor>
    <homepage href=""/>
    <description>SolomonKingdom</description>
    <description kind="short">SolomonKingdom</description>
 <offline-allowed/>
</information>
 <update check="background"/>
 <security>
  <all-permissions/>
 </security>
<resources>
    <j2se java-vm-args="-Djava.security.policy=applet.policy" version="1.7+"/>
    <jar href="SolomonKingdom.jar" main="true"/>
<jar href="lib/GammingImage.jar"/>
<jar href="lib/SolomonKingdomResources.jar"/>
</resources>
<applet-desc height="768" main-class="solomonkingdom.loginScreen" name="SolomonKingdom" width="1024">
</applet-desc>
</jnlp>

我已经在Java Panel中添加了例外

http://mygame.droppages.com/
https://dl.dropboxusercontent.com/u/78281142/launch.jnlp

还有更多......

java.lang.SecurityException: JAR manifest codebase mismatch for dl.dropboxusercontent.com/u/78281142/SolomonKingdom.jar
    at com.sun.deploy.security.DeployManifestChecker.verify(Unknown Source)
    at com.sun.deploy.security.DeployManifestChecker.verify(Unknown Source)
    at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

有人可以说我需要做些什么才能找到我做错的地方。谢谢!

答案

使用该错误消息,最重要的部分是Codebase属性。第一次尝试将Codebase: *放入清单文件中。有关更多详细信息,请参阅codebase-attribute-in-manifest-mismatch

以上是关于JAR清单代码库不匹配的主要内容,如果未能解决你的问题,请参考以下文章

Debian Buster 中的库不匹配?

AppCompat 操作栏库不显示添加的片段

Sublime text3最全快捷键清单

将外部 jar 添加到 Maven 存储库不起作用 [重复]

Sublime text3最全快捷键清单

库不包含在javaFX jar中