Created
December 15, 2023 12:56
-
-
Save ansulev/1b924e87bd091b1d78e06d918faa8fcf to your computer and use it in GitHub Desktop.
Install Java 8 or 11 on Debian 12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /etc/apt/keyrings | |
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc | |
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list | |
apt update | |
apt install temurin-8-jdk | |
update-alternatives --config java # choose new java | |
update-alternatives --config javac # choose new javac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!