sudo pacman -S jre-openjdk wget https://github.com/adoptium/temurin17-binaries/releases/.../OpenJDK17U-jre_x64_linux_hotspot.tar.gz sudo tar -xzf OpenJDK17U-jre_x64_linux_hotspot.tar.gz -C /usr/lib/jvm/ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-17.0.12+7-jre/bin/java 1 3.3 Managing Multiple JRE Versions Use update-alternatives to switch between JREs:
sudo dnf install java-17-openjdk
Observation: For low-latency applications on Linux, ZGC or Shenandoah with large heaps (>8 GB) is recommended. | Platform | JRE Startup Time | Throughput (relative) | Memory Footprint | |----------|------------------|------------------------|------------------| | Intel Xeon (x86_64) | 0.8 s | 1.00 | 512 MB | | AMD EPYC (x86_64) | 0.9 s | 1.02 | 510 MB | | AWS Graviton 3 (ARM64) | 0.7 s | 0.95 | 505 MB | | Raspberry Pi 4 (ARM64) | 2.1 s | 0.42 | 380 MB |
sudo apt update sudo apt install openjdk-17-jre-headless # For headless servers sudo apt install openjdk-17-jre # Full desktop support
Unlike Windows or macOS, Linux environments vary widely—from minimal headless servers to full-featured desktop distributions. This variability demands a nuanced understanding of JRE deployment. Furthermore, the shift from Oracle’s proprietary JRE to open-source OpenJDK has redefined licensing and distribution on Linux.
java -version # Should show: "Headless" or absence of AWT exceptions 6.1 JRE Vulnerabilities and Patching Linux distributions provide security updates via system package managers. Always use a supported LTS version (e.g., OpenJDK 17, 21). Monitor CVE databases (NVD, Red Hat Security). 6.2 Security Manager and Policy Files Although deprecated in Java 17+ (removed in Java 21), legacy systems can restrict permissions via java.policy :
| GC Algorithm | Throughput (ops/sec) | Avg Pause (ms) | Max Pause (ms) | |--------------|----------------------|----------------|----------------| | G1GC (default) | 12,450 | 18 | 45 | | Parallel GC | 14,200 | 62 | 210 | | ZGC (experimental) | 11,980 | 2 | 8 | | Shenandoah | 12,100 | 4 | 15 |