更新时间:2023-12-03 14:12:10
解决方案1:配置Java 7
需要在命令行中使用Java属性启用TLS 1.2协议
It is need to enable TLS 1.2 protocol with Java property in the command line
mvn -Dhttps.protocols=TLSv1.2 install
install
仅仅是目标的一个例子
install
is just an example of a goal
ant
的相同错误可以通过这种方式解决
The same error for ant
can be solved by this way
java -Dhttps.protocols=TLSv1.2 -cp %ANT_HOME%/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher
解决方案2:将Java 7与Oracle Advanced Support一起使用
也可以通过更新Java 7版本来解决问题.但是最后可用的版本(7u80
)不能解决问题.需要使用Oracle Advanced Support(以前称为Java for Business)提供的更新.
Also problem can be solved by updating the Java 7 version. But the last available version (7u80
) doesn't fix the problem. It is need to use an update provided with Oracle Advanced Support (formerly known as Java for Business).
解决方案3:改用Java 8
配置$JAVA_HOME
使其指向Java 8.
Configure $JAVA_HOME
to point to Java 8.