Skip to main content

Crate java_manager

Crate java_manager 

Source
Expand description

A library for locating Java installations on the local system and executing Java programs.

This crate provides functionality to:

  • Discover Java runtimes via PATH, JAVA_HOME, or deep system scans.
  • Extract detailed metadata (version, vendor, architecture) from each installation.
  • Execute Java applications with configurable arguments, memory settings, and I/O redirection.

§Examples

use java_manager::{java_home, JavaRunner};

// Find all Java installations in PATH
let java = java_home().unwrap();
// Run a JAR file
JavaRunner::new()
    .java(java)
    .arg("--version")
    .execute()?;

Re-exports§

pub use info::JavaInfo;
pub use error::JavaError;
pub use local::java_home;
pub use execute::JavaRunner;
pub use execute::JavaRedirect;

Modules§

error
Error types for Java environment detection and execution.
execute
Running Java programs with controlled output and redirection.
info
Core type representing a Java installation and its metadata.
local
Functions for accessing Java from the local environment.
search
Functions for locating Java installations on the system.