#locator #manager #jvm #java

java-manager

A Rust library for managing and locating Java installations

1 unstable release

Uses new Rust 2024

new 0.1.0 Jan 28, 2026

#690 in FFI

MIT/Apache

115KB
1.5K SLoC

Java Manager Library

A comprehensive Rust library for discovering, managing, and interacting with Java installations.

This library provides functionality to:

  • Locate Java installations across different platforms
  • Extract detailed information about Java installations
  • Execute Java commands and capture output
  • Manage multiple Java installations
  • Search for files within Java installations

Features

  • Cross-platform support: Works on Windows, macOS, and Linux/Unix
  • Comprehensive Java detection: Finds Java installations in common locations
  • Detailed Java information: Extracts version, architecture, supplier information
  • Advanced searching: Wildcard support for file searches
  • Command execution: Execute Java commands and capture output

Quick Start

use java_manager;

fn main() -> java_manager::Result<()> {
    // Get detailed information about the default Java installation
    let java_info = java_manager::get_local_java_home()?;
    println!("Default Java: {}", java_info);

    // Find all Java installations on the system
    let installations = java_manager::find_all_java_installations()?;
    println!("Found {} Java installations", installations.len());

    // Execute a Java command
    let output = java_info.execute_with_output(&["-version"])?;
    println!("Java version output:\n{}", output);

    Ok(())
}

Java Manager

A comprehensive Rust library and command-line tool for discovering, managing, and interacting with Java installations.

Features

  • Cross-platform: Works on Windows, macOS, and Linux/Unix
  • Comprehensive discovery: Finds Java installations in common locations
  • Detailed information: Extracts version, architecture, supplier information
  • Command execution: Execute Java commands and capture output
  • Multiple installation management: Manage and switch between different Java versions
  • File searching: Find files within Java installations with wildcard support
  • Documentation location: Locate Java documentation directories

Installation

As a Library

Add to your Cargo.toml:

[dependencies]
java-manager = "0.1"

Dependencies

~50KB