This is a fully working example for how to use Elektra with Maven or Gradle for reading keys.
First Make sure to install the Elektra Java binding to your local maven repository:
cd ./src/bindings/jna
./gradlew publishLibelektraPublicationToMavenLocalAlternatively change the libelektra dependency in build.gradle to a published version, fitting your Elektra installation.
(See JNA binding for more information.)
Then change to the example app folder:
cd ../../../examples/external/java/read-keys-exampleUse a local Gradle installation to run the example app:
gradle runAlternatively use a local Maven installation to run the example app:
mvn compile exec:java