lighty-java
Java runtime management for LightyLauncher.
Note
This is an internal crate for the LightyLauncher ecosystem. Most users should use the main lighty-launcher crate instead.
Features
- Automatic JRE Download: Download and install Java runtimes on demand
- Multiple Distributions: Support for Temurin, GraalVM, Zulu, and Liberica
- Version Detection: Detect required Java version for Minecraft
- Cross-Platform: Windows, Linux, and macOS support
Usage
[]
= "0.6.3"
use ;
use ProjectDirs;
async
Structure
lighty-java/
└── src/
├── lib.rs # Module declarations and re-exports
├── distribution/ # Java distribution providers
│ ├── mod.rs # Distribution types and main API
│ ├── api_models.rs # API response structures
│ ├── utils.rs # Shared utilities
│ └── providers/ # Individual distribution providers
│ ├── temurin.rs # Adoptium Temurin provider
│ ├── graalvm.rs # Oracle GraalVM provider
│ ├── zulu.rs # Azul Zulu provider
│ └── liberica.rs # BellSoft Liberica provider
├── jre_downloader.rs # Download and install JRE
├── runtime.rs # Java version detection and validation
└── errors.rs # Error types for Java operations
Supported Distributions
Temurin (Recommended)
Eclipse Temurin - OpenJDK builds from the Adoptium project.
use JavaDistribution;
let distribution = Temurin;
Supported Versions: 8, 11, 17, 21 Best for: General use, maximum compatibility
GraalVM
GraalVM - High-performance JDK with advanced optimizations.
use JavaDistribution;
let distribution = GraalVM;
Supported Versions: 17, 21 Best for: Modern Minecraft versions (1.17+), maximum performance
Zulu
Azul Zulu - OpenJDK builds with enterprise support available.
use JavaDistribution;
let distribution = Zulu;
Supported Versions: 8, 11, 17, 21 Best for: Enterprise environments, certified builds
Liberica
BellSoft Liberica - Lightweight OpenJDK distribution.
use JavaDistribution;
let distribution = Liberica;
Supported Versions: 8, 11, 17, 21 Best for: Resource-constrained systems, lightweight deployments
Platform Support
| Platform | Architectures | Status |
|---|---|---|
| Windows | x64, ARM64 | Tested |
| Linux | x64, ARM64 | Tested |
| macOS | x64, ARM64 | Tested |
License
MIT
Links
- Main Package: lighty-launcher
- Repository: GitHub
- Documentation: docs.rs/lighty-java