you'll either want to expose a Java API from the Rust side (
https://docs.rs/jni/latest/jni/)
or expose a C API from Rust and use JNA or JNR or Project Panama to access them from Java
in both cases you'll need to be able to build the Cargo crate as a loadable shared library