先安装java 11, 再更新软连接
sudo apt update sudo apt install -y openjdk-11-jdk 1. check java $which java /usr/bin/java $ ls -lrt /usr/bin/java lrwxrwxrwx 1 root root 22 Aug 31 2021 /usr/bin/java -> /etc/alternatives/java $ ls -lrt /etc/alternatives/java lrwxrwxrwx 1 root root 46 May 30 10:23 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 2. change link path sudo ln -s -f /usr/lib/jvm/java-11-openjdk-amd64/bin/java /etc/alternatives/java
标签:bin,java,alternatives,etc,usr,ubuntu18,java11,root,java8 From: https://www.cnblogs.com/sciapex/p/17632392.html