jni_rs/README.md

23 lines
280 B
Markdown
Raw Normal View History

2022-02-22 12:29:33 +00:00
Rust build
```shell
cd mylib
cargo build
```
Java build
```shell
cd java_src
javac me/ehlxr/HelloWorld.java
```
Run Java
```shell
cd java_src
// Linux: export LD_LIBRARY_PATH=../mylib/target/debug/
export JAVA_LIBRARY_PATH=../mylib/target/debug/
java me.ehlxr.HelloWorld
```