Linux commands

Wednesday, April 4, 2012

keytool error: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider

Dude nothing to worry , I solved the same error, please concentrate on JAVA paths

install java -6-openjdk

find out right java path first
Find outjava(executable) in  in this path it is there or not
$/usr/lib/jvm/java-6-openjdk/jre/bin
if is there then do
Now java home will become
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre

PATH will become
export PATH=$PATH:$JAVA_HOME/bin
or
export PATH=$PATH:/usr/lib/jvm/java-6-openjdk/jre/bin

In this path /usr/lib/jvm/java-6-openjdk/jre/bin  u can find out keytool(executable) that means you are pointing to correct location
now run

command is correct
$ keytool -keystore /home/moto/cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -storepass changeit -list -v

I got the output



Keystore type: BKS
Keystore provider: BC


Your keystore contains 157 entries


Alias name: 109
Creation date: 3 Sep, 2011
Entry type: trustedCertEntry


Owner: C=US,O=AffirmTrust,CN=AffirmTrust Commercial
Issuer: C=US,O=AffirmTrust,CN=AffirmTrust Commercial
Serial number: 7777062726a9b17c
Valid from: Fri Jan 29 19:36:06 IST 2010 until: Tue Dec 31 19:36:06 IST 2030
Certificate fingerprints:
         MD5:  82:92:BA:5B:EF:CD:8A:6F:A6:3D:55:F9:84:F6:D6:B7
         SHA1: F9:B5:B6:32:45:5F:9C:BE:EC:57:5F:80:DC:E9:6E:2C:C7:B2:78:B7
         Signature algorithm name: SHA256WithRSAEncryption
         Version: 3




*******************************************
*******************************************
                                                              1


No comments:

Post a Comment