linux安装切换多个版本jdk
所属分类 java
浏览量 261
查看操作系统版本
uname -a
cat /etc/redhat-release
sudo yum search java | grep openjdk
sudo yum install java-1.8.0-openjdk.x86_64
sudo yum install java-11-openjdk.x86_64
java
java -version
java -verbose
which java
/usr/bin/java
ls -al /usr/bin |grep java
lrwxrwxrwx 1 root root 22 12月 26 18:20 java -> /etc/alternatives/java
选择jdk
sudo alternatives --config java
共有 2 个提供“java”的程序。
选项 命令
-----------------------------------------------
*+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-9.oe1.x86_64/jre/bin/java)
2 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.12.9-1.oe1.x86_64/bin/java)
按 Enter 保留当前选项[+],或者键入选项编号:
选择2
java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Bisheng (build 11.0.12+9)
OpenJDK 64-Bit Server VM Bisheng (build 11.0.12+9, mixed mode, sharing)
上一篇
下一篇
flink checkpoint 检查点
Flink1.18.1 本地单机部署 及 flinkCDC3.0 测试
Skywalking 术语
doris 简介
linux 权限 777
Prometheus Pushgateway