Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to specify the '<pathlist>' while using 'keytool -importcert ... -providerpath <pathlist>...'

Tags:

java

keytool

while using command below:

keytool -importcert -v -trustcacerts -alias mycert -file cacert.pem \ -keystore mycert.bks -storetype BKS \ -providerpath /path/to/prov-1.53.0.0.jar \ -providerclass org.spongycastle.jce.provider.BouncyCastleProvider \ -storepass blahblah

it generate this:

Exception in thread "main" java.lang.NoClassDefFoundError: org/spongycastle/util/Strings
...
Caused by: java.lang.ClassNotFoundException: org.spongycastle.util.Strings
...

so I figured I also need to pass the /path/to/core-1.53.0.0.jar to the -providerpath

keytool -importcert -help shows -providerpath <pathlist>, I don't know whether it implicates I can attach a list-like param to it or not, and if so which is the right way to do it.(i have tried using space as delimiter like the bash array, comma like the c array, also the colon)

like image 449
kyokose Avatar asked Oct 20 '25 10:10

kyokose


1 Answers

The -providerpath argument can take a colon delimited list of jars, similar to the -cp or -classpath argument to the java command.

like image 136
Pace Avatar answered Oct 21 '25 22:10

Pace



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!