This is Java Development Kit installer for Linux Debian-based system (Debian, Ubuntu). All JDKs downloads from offical Oracle's website. Script is fully automatic. You just need to choose a version and chill out.
Important
Online install only works with JDKs which is distributed under the Oracle No-Fee Terms and Conditions License (JDK 17 and later)
wget -O jdk-i.sh https://raw.githubusercontent.com/medowic/jdk-installer/master/jdk-i.sh
chmod +x jdk-i.shBefore you start script you must to choose a JDK version and write it in first flag
./jdk-i.sh [JDK-VERSION] [FLAGS]Warning
If another version of JDK is found, it will be deleted and the JDK version that was specified will be installed
This command will install JDK 21.0.1
./jdk-i.sh 21.0.1This command will install JDK 21, but during the installation process, the script will ask you which version to install: the latest (21.0.4+, for exapmle) or the oldest (21)
Note
This exception works if it's only the LTS version
./jdk-i.sh 21This command will install JDK from .deb-package (offline install)
Important
Offline install only works with .deb-packages
./jdk-i.sh /path/to/jdk.deb--latest/-l- Install latest version of JDK, (if it's LTS version, for example)--oldest/-o- Install oldest (first) version of JDK, (if it's LTS version, for example)
This command will install oldest (21) JDK version
./jdk-i.sh 21 --oldestThis command will install latest (21.0.4+) JDK version
./jdk-i.sh 21 --latestThis command will delete JDK from your machine
./jdk-i.sh deleteThis is project is under the MIT License