use jvmrs::interpreter::Interpreter;
use std::path::PathBuf;
fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("=== Rust Calling Java Example ===");
let classpath = vec![PathBuf::from("examples")];
let mut interpreter = Interpreter::with_classpath(classpath);
interpreter.load_class_by_name("Minimal")?;
interpreter.run_main("Minimal")?;
let obj = interpreter.new_instance("Minimal", &[])?;
let class_name = interpreter.get_object_class(&obj)?;
println!("Created instance of class: {}", class_name);
Ok(())
}