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.sh
Before you start script you must to choose a JDK version and write it in first flag
./jdk-i.sh [JDK-VERSION] [FLAGS]
Note
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.1
This command will install JDK 21, but during the installation process, the script will ask you which version to install: the Latest or the Oldest (because this is the LTS version)
./jdk-i.sh 21
This 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 (first) JDK version
./jdk-i.sh 21 --oldest
This command will install latest JDK version
./jdk-i.sh 21 --latest
This command will delete JDK from your machine
./jdk-i.sh delete
This is project is under the MIT License