This script provides an automated installation process for multiple Java versions on Debian-based Linux systems, optimized for running Minecraft servers.
- Interactive selection of Java versions to install
- Supports Java 8 (manual install), Java 11, 17, 19, and default-jdk from APT
- Auto-detection of missing packages (
curl,sudo,tar) and guided installation - Optional logging of all output to a log file
- Displays currently installed Java versions
- Guides the user through setting default
javaandjavacversions
| Option | Java Version | Minecraft Version Range |
|---|---|---|
| 1 | Java 8 | Minecraft 1.8 – 1.16.x |
| 2 | Java 11 | Minecraft 1.17 – 1.18.x |
| 3 | Java 17 | Minecraft 1.18.2 – 1.20.4 |
| 4 | Java 19 | Experimental / Snapshots |
| 5 | Default JDK | Future Versions (1.21+) |
- Debian/Ubuntu-based system
- Shell access with
sudoprivileges - Internet access
- Download the script:
install_mc_java.sh - Make it executable:
chmod +x install_mc_java.sh
- Run the script:
./install_mc_java.sh
- Follow the on-screen prompts to select and install Java versions.
To log all output to install_java.log, run:
./install_mc_java.sh --logCopyright (c) 2026 JOTIBI
Permission is hereby granted to use this software on any Minecraft server (private or public) and within modpacks.
The following conditions apply:
- This software may NOT be sold, sublicensed, or monetized in any way, either alone or as part of a bundle.
- Modification of the software is permitted for own server operation, including public servers.
- Modified versions may NOT be published, distributed, uploaded, or shared in any form.
- Redistribution of the original software is NOT permitted.
- When this software is used in modpacks, visible credit to the original author must be provided (e.g. in the modpack listing, description, or a README file).
- This copyright and license notice must not be removed or altered.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.