引起:java.lang.NoClassDefFoundError:org / bouncycastle / asn1 / ASN1ObjectIdentifier

时间:2016-08-05 10:25:27

标签: java applet bouncycastle

我创建了applet并使用bouncycastle类进行数字证书。

我已经对java 8 101进行了一些更改并签署了这个jar

但更改后会抛出异常。

StackTrace:

java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.instantiateApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1ObjectIdentifier

at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
... 24 more

请帮我解决这个问题。

2 个答案:

答案 0 :(得分:1)

已解决

感谢所有人 我尝试了很多东西,但没有找到任何解决方案。最后我尝试了下面的工作。

我做了以下更改并为我工作。

新的jar文件版本是lib文件夹中的bcprov-ext-jdk15on-1.47.jar,并在MANIFEST.MF中为这个jar文件创建条目

在MANIFEST.MF进行了更改之后,我已经签署了 bcprov-ext-jdk15on-1.47.jar applet.jar 文件,并为我工作。

感谢。

答案 1 :(得分:0)

你使用的是什么版本的充气城堡?你尝试过最新版的吗?还请检查您的jdk是32位还是64位。希望这会有所帮助。