Missing Native Mac OSX dylibs on couchbase-lite-java

Hi everyone,

I’m trying to run a pure Java instance of Couchbase Lite Java on Mac OSX, but when open the DB I obtain the following:

Grave: Native: Library not found: /native/osx/x86_64/libCouchbaseLiteJavaNative.dylib

I saw that in couchbase-lite-java-native.jar only linux libCouchbaseLiteJavaNative.so are present for different architectures.

Is there a way to compile or obtain them for Mac OSX ?

Regards,
Andrea

Yes, you can build the library for the Mac OSX. You can follow the instructions at the github repo or do as follows :
$ git clone https://github.com/couchbase/couchbase-lite-java
$ cd couchbase-lite-java
$ git submodule init && git submodule update
$ ./gradlew build && ./gradlew distZip (The packaged file will be located at build/distributions)

Note that the XCode Command Line Tools is required to build the library. If you do not have it installed on your machine, you can download from https://developer.apple.com/downloads and install.

Also see: https://github.com/couchbase/couchbase-lite-java/blob/master/README.md

Is there a specific reason you want to use the Java library on Mac OS? Generally it’s preferable to use the native Objective-C version. The couchbase-lite-ios Xcode project has targets to build for Mac OS.

(Of course, if you’re building a Java app I can see why you’d need the Java library. But in that case it’s pretty likely that you’d be building your app on another platform.)

–Jens