#java #run-time #j4rs

java_runtime

An additional crate for j4rs, providing jre8

2 releases

0.0.2 Feb 7, 2024
0.0.1 Feb 6, 2024

#30 in #runtime

30 downloads per month

MIT/Apache

9KB
83 lines

Java Runtime

Crate Crates.io License GitHub last commit GitHub issues GitHub pull requests

Read this in other languages: English, 简体中文.

Description

Automatically detect Java path and download and install Jdk8u402 if it does not exist.

So that you can easily use j4rs in any environment.

Features

  • Detect installed Java path. (Using java_locator crate.)
  • Validate Java version.
  • Auto download and install Java`.
  • Download progress callback.
  • Offline feature.
  • All platform support. (Now is only Windows.)
  • More jre/jdk version support. (Now is only jdk8u402.)

Usage

Add this to your Cargo.toml:

[dependencies]
java_runtime = "~0.0"

Example

use java_runtime::{Result, prepare_java8};

fn main() -> Result<()> {
    prepare_java8()?;
    Ok(())
}

Dependencies

~9–20MB
~292K SLoC