如何在Linux机器上安装充气城堡

时间:2013-12-04 05:27:22

标签: bouncycastle keystore

当我在Linux机器上安装充气城堡并运行以下命令时,

keytool -importcert -v -trustcacerts -file "path_to_cert/interm_ca.cer" -alias IntermediateCA -keystore "res/raw/myKeystore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "path_to_bouncycastle/bcprov-jdk16-145.jar" -storetype BKS -storepass mysecret

我收到以下错误:

keytool error: 
java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:668)
at sun.security.tools.KeyTool.run(KeyTool.java:340)
at sun.security.tools.KeyTool.main(KeyTool.java:333)

有人可以解释一下如何在Linux机器上安装充气城堡吗?

2 个答案:

答案 0 :(得分:0)

将BouncyCastle添加到Java类路径。

答案 1 :(得分:0)

here下载Bouncy Castle jar并将其添加到您的类路径中。