diff options
| author | Joseph Henry <[email protected]> | 2018-09-06 15:30:34 -0700 |
|---|---|---|
| committer | Joseph Henry <[email protected]> | 2018-09-06 15:30:34 -0700 |
| commit | f9e83bcb59c0605272d3a4f98bb92850077f04f3 (patch) | |
| tree | 5beb7adc7659f0e1a6c869731cf7c49c3a24ad6b /examples/java/README.md | |
| parent | 84fcfd3baf28fe0d416ce3648073e88369980c20 (diff) | |
Improvements to packaging scripts
Diffstat (limited to 'examples/java/README.md')
| -rw-r--r-- | examples/java/README.md | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/examples/java/README.md b/examples/java/README.md index 0dcbda6..c5472b9 100644 --- a/examples/java/README.md +++ b/examples/java/README.md @@ -1,27 +1,8 @@ ## ZeroTier with Java via JNI *** -### Example App +### ExampleApp -- From libzt main directory, build shared library: `make shared_jni_lib` -- Copy the resultant dynamic library (`*.so` or `*.dylib`) from `build/` to this current directory -- Change to this directory and `make example_java_app` -- Run: `java -cp "." ExampleApp` - -### JAR file (with embedded C++ dynamic library) - -``` -make example_java_app -make copy_dynamic_lib -make jar -``` - -Notes: - -Upon execution, it will load the libzt dynamic library via the `loadLibrary` method and begin generating an identity. - -*** - -More resources on JNI usage: - -http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/index.html +Copy `zt.jar` file into this directory +Extract shared library from JAR file: `jar xf zt.jar libzt.dylib` +Build ExampleApp: `javac -cp ".:zt.jar" ExampleApp.java`
\ No newline at end of file |
