Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (37 sloc) 1.43 KB

EJDB2 Java JNI binding

Embeddable JSON Database engine Java binding.


For API usage examples take a look into and classes.

Minimal example

public static void main(String[] args) {
  try (EJDB2 db = new EJDB2Builder("example.db").truncate().open()) {
    long id = db.put("parrots", "{\"name\":\"Bianca\", \"age\": 4}");
    System.out.println("Bianca record: " + id);

    id = db.put("parrots", "{\"name\":\"Darko\", \"age\": 8}");
    System.out.println("Darko record: " + id);

    db.createQuery("@parrots/[age > :age]").setLong("age", 3).execute((docId, doc) -> {
      System.out.println(String.format("Found %d %s", docId, doc));
      return 1;

Supported platforms

  • Linux x64
  • OSX

How to build it manually

git clone
cd ./ejdb
mkdir ./build && cd build

Run example

cd build/src/bindings/ejdb2_jni/src

java -Djava.library.path=. \
     -cp ejdb2jni.jar \
You can’t perform that action at this time.