OpenJDK 17 installs on Ubuntu in three commands - but enterprises should note the gaps
The basic OpenJDK 17 installation on Ubuntu 22.04 or Zorin OS takes three terminal commands:
sudo apt update
sudo apt install openjdk-17-jdk
java -version
This works. It's the fastest path to a working Java 17 environment for development. OpenJDK 17 ships in Ubuntu repositories, gets security patches through standard distro updates, and Red Hat data suggests roughly 70% of enterprises run OpenJDK for cost-free LTS support.
What the tutorial doesn't cover
The three-command approach assumes several things that don't always hold in enterprise environments:
No internet connectivity. Air-gapped systems need manual tar.gz extraction. This means downloading the JDK elsewhere, transferring it via approved channels, extracting to a user directory (typically ~/java/jdk-17), and manually configuring JAVA_HOME and PATH variables.
Single Java version. Production systems often run multiple JDK versions. The update-alternatives system manages this on Ubuntu, but initial setup trips up teams used to Windows or macOS patterns. Setting a default requires sudo update-alternatives --config java.
Root access. The sudo apt method assumes administrative privileges. User-space installs require manual tar extraction and environment variable configuration in ~/.bashrc or ~/.profile.
JAVA_HOME persistence. Many enterprise applications expect JAVA_HOME to be set. The apt install doesn't configure this automatically. Teams need to add export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 to environment files.
Oracle JDK adds complexity
Oracle's proprietary JDK 17 requires third-party PPAs (like Linux Uprising's repository), license acceptance, and manual registration. Most enterprises stick with OpenJDK unless they have specific Oracle support contracts. The TCO difference matters at scale.
The real question is deployment
Getting Java 17 installed locally is straightforward. The complexity emerges when teams need to:
- Deploy consistently across hundreds of servers
- Manage updates without breaking existing applications
- Handle air-gapped production environments
- Maintain multiple JDK versions simultaneously
- Document configuration for compliance audits
The three-command tutorial gets developers started. Production deployment requires more planning.
Worth noting: Java 21 (the next LTS) and Java 23 follow the same installation patterns, but repository availability lags major releases by months. Teams running current versions often resort to manual tar installs regardless of connectivity.