Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 11 add .pem to cacerts

Tags:

java

I try to equip some corporate JDKs with certificates. For Java 8 it was done like this:

keytool -importcert -file cert.pem -keystore cacerts -storepass changeit -noprompt -alias alias

When I do this with Java 11 it is still working, but I get a warning:

Warnung: Verwenden Sie die Option -cacerts für den Zugriff auf den cacerts Keystore

Translation: Warning: Use the option -cacerts für access to cacerts keystore

But I don't know what to do with -cacerts option.

like image 972
ochs.tobi Avatar asked Oct 16 '25 04:10

ochs.tobi


1 Answers

Just replace -keystore cacerts with -cacerts to avoid this warning. More info.

like image 131
Benoit Avatar answered Oct 17 '25 18:10

Benoit



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!