0%

2021-10-21-debian10 卸载openjdk11并安装 openjdk8

1. debian10 卸载openjdk11并安装 openjdk8#

1.1. 卸载openjdk11#

1
2
3
4
5
apt-cache search java | awk '{print($1)}' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e 'java-common' | xargs sudo apt-get -y remove

sudo apt-get -y autoremove

sudo apt-get update

1.2. 安装 openjdk8#

1
2
3
4
5
6
7
8
apt-get update
apt-get install software-properties-common

apt-add-repository 'http://mirrors.ustc.edu.cn/AdoptOpenJDK/deb buster main'
apt-get update

sudo apt-get install adoptopenjdk-8-hotspot