My requirement is to import the certificate for maven repositories into the global keystore.
The certificate file is called maven-cacert.cer.
I use the following command from C:\Program Files\Java\jdk1.6.0_20\bin\ from cmd
keytool -importcert -trustcacerts -alias c:\maven-cacert.cer -file c:\maven-cacert.cer.der -keystore $JAVA_HOME\jre\lib\security\cacerts
how the maven-cacert.cer file is located in the C directory
after pressing enter, he asked to put the password and after providing the password he says how
keytool error: java.io.FileNotFoundException: $JAVA_HOME\jre\lib\security\cacerts (The system cannot find the path specified
I also tried
keytool -importcert -trustcacerts -alias c:\maven-cacert.cer -file c:\maven- cacert.cer.der -keystore \usr\java/jdk1.6.0_20/bin/java\jre\lib\security\cacerts
but getting the same output
Please help with what happens to my team, and the cacerts is inside the $JAVA_HOME\jre\lib\security\ directory.
source share