lighty-java
Overview
Quick Start
[dependencies]
lighty-java = "0.8.6"Basic Usage
use lighty_java::{JavaDistribution, jre_downloader};
use std::path::Path;
#[tokio::main]
async fn main() {
let runtime_dir = Path::new("./runtimes");
// Download Java 21 (Temurin distribution)
let java_path = jre_downloader::jre_download(
runtime_dir,
&JavaDistribution::Temurin,
&21,
|current, total| {
let percent = (current * 100) / total;
println!("Download progress: {}%", percent);
}
).await.unwrap();
println!("Java installed at: {}", java_path.display());
}Version Detection
Java Distributions
Distribution
Provider
Supported Versions
Best For
Platform Support
Platform
Architecture
Temurin
GraalVM
Zulu
Liberica
Complete Example
Documentation
Guide
Description
License
Links
Last updated