Azul Zulu JDKJRE是什么么?

Asked
5 years, 1 month agoModified
8 months agoViewed
83k timesHow do I import certs into keystore in Azul Zulu JDK 11.Where is the default keystore used by keytoolFrom running Azul's Alpine OpenJDK11 container, FROM azul/zulu-openjdk-alpine:11, the cacerts file is located at /usr/lib/jvm/java-11-zulu11/jre/lib/security/.But, to import new certs into it, you only need to specify the -cacerts switch and the command takes care of the rest.Below is an example of a command I used in a recent Dockerfile:keytool -importcert -file <my-crt-file-location> -cacerts -keypass changeit -storepass changeit -noprompt -alias <my-alias>
0
Path of java 11 trust store is C:\Program Files\Java\jdk-11.0.4\lib\security\cacertsTo import cert in windows use below command."C:\Program Files\Java\jdk-11.0.1\bin\keytool" -importcert -file C:\Polarion\bundled\apache\conf\certificate.crt -alias labs.polarion.com -keystore "C:\Program Files\Java\jdk-11.0.1\lib\security\jssecacerts" -storepass changeit
For more info visit, Click hereFor MAC and LINUX openJDK11first find the jdk locationecho $JAVA_HOME
since keytool and cacerts located in different folder we have to specify the pathgo to keytool folder
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/securitySudo keytool -import -noprompt -trustcacerts -alias aliasName -file
/Users/lilojoseph/Desktop/dev.ssk.cer
-keystore
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/lib/security/cacerts -storepass changeit
for checking if certificate is added run below command on same folder keytool -list -v -keystore
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/lib/security/cacerts -alias aliasName
1
for
adoptopenjdk/openjdk11@sha256:1cf34e59b4f6209c8513a1681a688bf8a90bf433993aa5b3914dcfdb100e9393
, the location for cacerts is:
/opt/java/openjdk/lib/security/cacerts
I installed Azul Zulu Java 8 and Java 11 through SDKMan.The cacerts file for my instances were as follows:Java 11~/.sdkman/candidates/java/11.0.14-zulu/zulu-11.jdk/Contents/Home/lib/security
Java 8Notice the extra jre/ folder~/.sdkman/candidates/java/8.0.322-zulu/zulu-8.jdk/Contents/Home/jre/lib/security
Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more
Sign up or log in Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guestEmailRequired, but never shown
Post as a guest
EmailRequired, but never shown

我要回帖

更多关于 JRE是什么 的文章

 

随机推荐