You want to install Java 8 on your server?

 

1. Update server package list

apt update && apt upgrade -y

 

2. Install Java 8

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

 

3. Checking the Java version

java -version
Was this answer helpful? 0 Users Found This Useful (0 Votes)