14 lines
362 B
Java
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.");
|
|
}
|
|
}
|