前往:zulu openjdk下载安装
https://www.azul.com/downloads-new/?package=jdk#zulu
安装成功后的目录:/Library/Java/JavaVirtualMachines/zulu-8.jdk
# rocky 自定义解决错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS12]”。 ClientConnectionId:c5be2a1b-4daf-486b-a402-9d3c3fe68949
修改:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/security/java.security文件内容中去掉SSLv3
将jdk.tls.disabledAlgorithms=TSSLv3,LSv1, TLSv1.1, RC4, DES, MD5withRSA, \
改为:jdk.tls.disabledAlgorithms=LSv1, TLSv1.1, RC4, DES, MD5withRSA, \
idea启动项目报错:The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
解决方法:
1、根据环境变量配置中 jre 的地址,在 jre\lib\security 文件夹下,编辑 java.security 文件
在文件中找到 jdk.tls.disabledAlgorithms 配置项,将 TLSv1, TLSv1.1, 3DES_EDE_CBC 删除即可。
#after
jdk.tls.disabledAlgorithms=SSLv3,RC4, DES, MD5withRSA,
DH keySize < 1024, EC keySize < 224, anon, NULL,
include jdk.disabled.namedCurves
#before
#jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jdk.disabled.namedCurves
配置环境变量:
cd
vi ./bash_profile
export JAVA_8_HOME=/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home
#这个是设置默认jdk
export JAVA_HOME=$JAVA_8_HOME
#快速切换版本使用
alias jdk8='export JAVA_HOME=$JAVA_8_HOME'
# 查看默认jdk安装路径
/usr/libexec/java_home