lighty-java
Automatic Java Runtime Environment (JRE) management for Minecraft launchers with multi-distribution support.
Overview
lighty-java provides automated downloading, installation, and management of Java runtimes for Minecraft:
- Automatic JRE Download - Download Java on-demand based on Minecraft version requirements
- Multi-Distribution Support - Temurin, GraalVM, Zulu, and Liberica distributions
- Cross-Platform - Windows, Linux, and macOS (x64 and ARM64)
- Version Detection - Automatically detect required Java version for any Minecraft version
- Progress Tracking - Real-time download and extraction progress via event system
Quick Start
[]
= "26.5.7"
Basic Usage
use ;
use Path;
async
Version Detection
use get_jre_version;
// Minecraft 1.20.4 requires Java 17
let required_version = get_jre_version;
println!; // 17
// Minecraft 1.16.5 requires Java 8
let required_version = get_jre_version;
println!; // 8
Java Distributions
| Distribution | Provider | Supported Versions | Best For |
|---|---|---|---|
| Temurin (Recommended) | Eclipse Adoptium | 8, 11, 17, 21 | General use, maximum compatibility |
| GraalVM | Oracle | 17, 21 | Modern Minecraft (1.17+), maximum performance |
| Zulu | Azul Systems | 8, 11, 17, 21 | Enterprise environments, certified deployments |
| Liberica | BellSoft | 8, 11, 17, 21 | Resource-constrained systems, lightweight deployments |
Platform Support
| Platform | Architecture | Temurin | GraalVM | Zulu | Liberica |
|---|---|---|---|---|---|
| Windows | x64 | ✅ | ✅ | ✅ | ✅ |
| Windows | ARM64 | ✅ | ❌ | ✅ | ✅ |
| Linux | x64 | ✅ | ✅ | ✅ | ✅ |
| Linux | ARM64 | ✅ | ✅ | ✅ | ✅ |
| macOS | x64 | ✅ | ✅ | ✅ | ✅ |
| macOS | ARM64 (M1/M2) | ✅ | ✅ | ✅ | ✅ |
Complete Example
use ;
use Path;
async
Documentation
| Guide | Description |
|---|---|
| Overview | Design and implementation details |
| How to use | Common usage patterns |
| Distributions | Deep dive into each Java distribution |
| Installation | Download and installation process |
| Runtime Execution | Java process execution and I/O handling |
| Events | JavaEvent variants |
| Exports | Public API surface |
License
MIT
Links
- Main Package: lighty-launcher
- Repository: GitHub
- Documentation: docs.rs/lighty-java