Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/main/java/ | 12-May-2024 | - | 26 | 16 | ||
README.md | D | 12-May-2024 | 1.4 KiB | 55 | 43 | |
pom.xml | D | 12-May-2024 | 1.4 KiB | 48 | 43 |
README.md
1## EJDB2 Java sample app 2 3First of all you need to get `libejdb2jni.so` native binding library for JVM. 4 5You can build it yourself 6 7```sh 8git clone https://github.com/Softmotions/ejdb.git 9cd ./ejdb 10mkdir ./build && cd build 11cmake .. -DBUILD_JNI_BINDING=ON -DCMAKE_BUILD_TYPE=Release 12make 13``` 14 15or install binary package from [our PPA repository](https://launchpad.net/~adamansky/+archive/ubuntu/ejdb2) 16 17```sh 18sudo add-apt-repository ppa:adamansky/ejdb2 19sudo apt-get update 20sudo apt-get install ejdb2-java 21``` 22 23Then compile and run app (Linux x86-64) 24 25```sh 26cd ejdb2_jni/example 27 28mvn clean compile 29mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="EJDB2Example" 30``` 31 32Note: Yoy may need to specify `LD_LIBRARY_PATH` env for `java` in order to help JVM find where 33the `libejdb2jni.so` library is located. For Linux systems `ejdb2-java` PPA debian package installs 34shared library symlink to `/usr/java/packages/lib` folder listed as default library search 35path for JVM so you can skip specifying `LD_LIBRARY_PATH` in that case. 36 37### Maven project configuration 38 39```xml 40<repositories> 41 <repository> 42 <id>repsy</id> 43 <name>EJDB2 Maven Repositoty on Repsy</name> 44 <url>https://repo.repsy.io/mvn/adamansky/softmotions</url> 45 </repository> 46</repositories> 47 48<dependencies> 49 <dependency> 50 <groupId>softmotions</groupId> 51 <artifactId>ejdb2</artifactId> 52 <version>2.0.57.11</version> 53 </dependency> 54</dependencies> 55```