| Crates.io | lighty-java |
| lib.rs | lighty-java |
| version | 0.8.6 |
| created_at | 2025-12-02 11:09:45.032163+00 |
| updated_at | 2025-12-14 07:26:50.794652+00 |
| description | Java runtime management for Lighty Launcher |
| homepage | https://github.com/Lighty-Launcher/LightyLauncherLib |
| repository | https://github.com/Lighty-Launcher/LightyLauncherLib |
| max_upload_size | |
| id | 1961617 |
| size | 97,356 |
Java runtime management for LightyLauncher.
This is an internal crate for the LightyLauncher ecosystem. Most users should use the main lighty-launcher crate instead.
[dependencies]
lighty-java = "0.6.3"
use lighty_java::{JavaDistribution, jre_downloader};
use directories::ProjectDirs;
#[tokio::main]
async fn main() {
let launcher_dir = ProjectDirs::from("com", "MyLauncher", "").unwrap();
// Download Java 21 (Temurin)
let java_path = jre_downloader::jre_download(
21,
JavaDistribution::Temurin,
&launcher_dir
).await?;
println!("Java installed at: {}", java_path.display());
}
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
Eclipse Temurin - OpenJDK builds from the Adoptium project.
use lighty_java::JavaDistribution;
let distribution = JavaDistribution::Temurin;
Supported Versions: 8, 11, 17, 21 Best for: General use, maximum compatibility
GraalVM - High-performance JDK with advanced optimizations.
use lighty_java::JavaDistribution;
let distribution = JavaDistribution::GraalVM;
Supported Versions: 17, 21 Best for: Modern Minecraft versions (1.17+), maximum performance
Azul Zulu - OpenJDK builds with enterprise support available.
use lighty_java::JavaDistribution;
let distribution = JavaDistribution::Zulu;
Supported Versions: 8, 11, 17, 21 Best for: Enterprise environments, certified builds
BellSoft Liberica - Lightweight OpenJDK distribution.
use lighty_java::JavaDistribution;
let distribution = JavaDistribution::Liberica;
Supported Versions: 8, 11, 17, 21 Best for: Resource-constrained systems, lightweight deployments
| Platform | Architectures | Status |
|---|---|---|
| Windows | x64, ARM64 | Tested |
| Linux | x64, ARM64 | Tested |
| macOS | x64, ARM64 | Tested |
MIT