Operating system
JavaOptionsCli is designed specifically for Debian-based Linux distributions. This includes:- Ubuntu
- Debian
- Linux Mint
- Pop!_OS
- Elementary OS
- Other Debian derivatives
Essential dependencies
sudo privileges
You must have sudo access to run JavaOptionsCli. The tool requires elevated privileges for:- Creating and managing the
/opt/javadirectory - Registering Java versions with
update-alternatives - Moving extracted Java installations to system directories
update-alternatives
Theupdate-alternatives command must be available on your system. This is typically pre-installed on all Debian-based distributions.
To verify it’s available:
/usr/bin/update-alternatives
JavaOptionsCli uses
update-alternatives to manage java, javac, and jar binaries, allowing seamless switching between multiple Java versions.Optional dependencies
lsd (LSDeluxe)
The tool useslsd for enhanced directory listings when displaying installed Java versions. While optional, it provides a better user experience.
Install lsd:
Directory structure
/opt/java
All Java versions are installed to/opt/java. The tool will automatically create this directory if it doesn’t exist.
Example structure:
Working directory
You must run JavaOptionsCli from the same directory where your Java.tar.gz files are located.
Pre-installation checklist
Before using JavaOptionsCli, ensure:- Running a Debian-based Linux distribution
- Have sudo privileges
-
update-alternativesis available - (Optional)
lsdis installed for better output - Downloaded Java
.tar.gzfiles are in your current directory - Have write permissions in
/opt(through sudo)