rust-interop/java/Main.java
2024-08-19 13:52:05 +03:00

14 lines
362 B
Java

// java/Main.java
public class Main {
static {
System.loadLibrary("rust_jni_example");
}
private static native void call_java_from_rust();
public static void main(String[] args) {
System.out.println("Calling Rust function...");
call_java_from_rust();
System.out.println("Rust function call completed.");
}
}