linux下安装JDK

2022/3/3 Java

# 1、安装命令:

yum search java | grep -i -color JDK
yum install -y java-1.8.0-openjdk-devel.x86_64 
1
2

# 2、测试命令:

java -version
1

# 3、切换JDK版本:

分别执行如下两条命令,然后选择对应的编号即可切换JDK

sudo update-alternatives --config java
sudo update-alternatives --config javac
1
2

4、查看jdk安装路径,详情见如下链接: https://www.cnblogs.com/cnmenglang/p/6270375.html (opens new window)

yum install yum-plugin-copr
yum copr enable @caddy/caddy
yum install caddy
1
2
3
更新日期: 2022/4/27 下午2:27:30