Couchbase-lite-java in arm64 architecture

hi everyone, I created a small project in java using the couchbaselite 3.1.1 library…I wanted to compile it for an arm64 architecture and I get this error how can I use this library in arm64
thanks in advance for the help

OpenJDK Client VM warning: You have loaded library /home/level/TestCouchBaseLite/CouchbaseLiteTemp/d3641d7d6861cb9e1ca084b36a0e924f/libLiteCore.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It’s highly recommended that you fix the library with ‘execstack -c ’, or link it with ‘-z noexecstack’.
Exception in thread “main” java.lang.IllegalStateException: Cannot load native library libLiteCore.so @/home/level/TestCouchBaseLite/CouchbaseLiteTemp/d3641d7d6861cb9e1ca084b36a0e924f/libLiteCore.so for Linux/arm
at com.couchbase.lite.internal.NativeLibrary.load(NativeLibrary.java:111)
at com.couchbase.lite.internal.CouchbaseLiteInternal.init(CouchbaseLiteInternal.java:74)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:72)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:56)
at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:42)
at igesa.MaincouchBaseLite.main(MaincouchBaseLite.java:35)
Caused by: java.lang.UnsatisfiedLinkError: /home/level/TestCouchBaseLite/CouchbaseLiteTemp/d3641d7d6861cb9e1ca084b36a0e924f/libLiteCore.so: /home/level/TestCouchBaseLite/CouchbaseLiteTemp/d3641d7d6861cb9e1ca084b36a0e924f/libLiteCore.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1817)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1088)
at com.couchbase.lite.internal.NativeLibrary.load(NativeLibrary.java:107)
… 5 more

If this is just using the stock library from maven then there is no arm64 support available unfortunately.

It sort of looks like you compiled your own core (beware the license!) though in which case it also looks like the device you are running on is arm not arm64 judging by the error messages.

thanks so much for the reply, do you know if there is another way I could interact with my java application? Or if there is a way to do it, does it work? another library or a compilation of the library in c

Linux/ARM is just not something we support, at the moment: We reallly don’t have experience with it. It seems theoretically possible that you could build LiteCore (as @borrrden says, note the license!) and then bundle it into the Java build. Of course, you’ll have to build the Java JNI code too. It seems like a fairly daunting task.

just for information, is there a package to generate the JNI? Which package should I use?

The JNI is not a separate package: it is part of the Android build.

The code is in /common/common/main/cpp. Gradle uses the AGP and NDK (see /ce/android/lib/build.gradle) to run CMake. The CMakeLists build script is /common/common/main/CMakeLists.txt

There is a guide document to test it?

Not that i know of, as such.

The code in build.gradle is, if not trivial, more or less straightforward. Same with the code in CMakeLists.

The build succeeds on my machine and our build machines (Java, WIndows, Linux), so it can at least, work. If it doesn’t work, you should get a decipherable error message. If that doesn’t get you to success, try posting the issue here.