rust-interop/java/Main.java

15 lines
362 B
Java
Raw Normal View History

2024-08-19 10:52:05 +00:00
// 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.");
}
}