Problem with java wrapper - no java_jni

Hi, I’m trying to re-write the basic samples using the java wrapper but when I try the static Astra.initialise() method I get a failure saying “Exception in thread “main” java.lang.UnsatisfiedLinkError: no astra_jni in java.library.path”

I’ve loaded astra, astra_core and astra_core_api using System.loadLibrary but can’t see the astra_jni anywhere in the SDK downloads? Any help gratefully appreciated

Also, is there any documentation anywhere on using the java wrapper, or the SDK in general?

Edit: Looking on git in the src folder there is a something for JNI but that seems missing from the downloaded SDK folders so maybe it wasn’t included for some reason? The actual call is in the NativeMethods class when I call the initialise and the line it fails on (unsurprisingly) is

    System.loadLibrary("astra_jni");

Thanks
Steve

Hello Steve,

On which OS are you ?

You need to install the binary files after driver installation. Here is how I do it :

Linux

Download the drivers, install them and copy the Redist folder contents like this:

sudo cp -r Redist/*.so  /usr/lib/
sudo cp -r Redist/*.ini /usr/lib
sudo cp -r Redist/OpenNI2 /usr/lib	

I work on a package for Manjaro/Arch linux: pkgbuild. I use it on my machines and have not published it yet.

Windows

Same as Linux, but I copy the files in C:/Windows/System32/ . I know, it’s bad.

OSX

It is a little bit more tricky. PhillipeG documented it here.

Debugging this is pain usually as the names of the missing libraries is generally not mentionned / easy to find.

Cheers,
Jeremy.

Thanks very much, I will give that a go.