Expand description
§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(())
}Re-exports§
pub use errors::JavaLocatorError;pub use errors::Result;pub use info::JavaInfo;pub use utils::get_java_architecture;pub use utils::get_java_info;pub use utils::get_java_suppliers;pub use utils::get_java_version;pub use local::find_all_java_installations;pub use local::get_java_document;pub use local::get_java_dyn_lib;pub use local::get_java_home as get_local_java_home;
Modules§
- errors
- Error handling module
- info
- Java information structures
- local
- Local Java installation management
- manager
- Java installation manager
- utils
- Utility functions
Functions§
- get_
jvm_ dyn_ lib_ file_ name - Returns the platform-specific name of the JVM dynamic library.
- locate_
file - Searches for a file within the Java installation directory.
- locate_
java_ home - Locates and returns the Java home directory path.
- locate_
jvm_ dyn_ library - Locates the JVM dynamic library directory.