Improved java example

This commit is contained in:
Bartłomiej Mazurski
2020-09-20 22:06:38 +02:00
parent 37c01e18cf
commit e503bf7a61
3 changed files with 56 additions and 33 deletions

25
examples/java/README.md Normal file
View File

@@ -0,0 +1,25 @@
### How to compile/use this example:
1. Follow "Building from source" section from README.md in the root of this git repository
(the linking step/example from that section does not apply to this example)
2. Create the java library .jar file:
```
make host_jar_release
```
for other `host_jar` variants see Makefile in the root of this git repository
2. Copy the output .jar to this directory:
```
cp lib/lib/release/linux-x86_64/zt.jar examples/java/simpleExample/
```
3. Now you can compile this example:
```
cd src
javac -cp ../zt.jar ./com/zerotier/libzt/javasimpleexample/*.java
```