1

I'm encountering a problem with the build of my JavaFX project with the Leap Motion. When I run the file.jar, the application's window is opening, but when I call the leap motion, it's not working any more.

I have the following error :

Native code library failed to load.
java.lang.UnsatisfiedLinkError: no LeapJava in java.library.path

Yet, I have configured the buildpath. I have added the leapJava.jar, with the native library x64.

I don't understand why it doesn't work ?

Anyone with an idea ?

Thanks

Ranpie49
  • 81
  • 2
  • 7
  • Try to monitor the system properties of your running Java application with jvisualvm.exe, which can be in the bin folder of your JDK. – gclaussn Feb 02 '15 at 08:52

4 Answers4

0

The LeapJava.dll is missing or the Java library path is not set up correctly. Please have a look at the docs - setting up a project: https://developer.leapmotion.com/documentation/java/devguide/Project_Setup.html

gclaussn
  • 1,736
  • 16
  • 19
0

I have followed each step in the Eclipse section. :/

Ranpie49
  • 81
  • 2
  • 7
0

Firstly, since you haven't mentioned any specification about your system, I am answering this in context with a 64 bit Ubuntu machine.

You will posses a libLeap.so and a libLeapJava.so in 'YourDeveloperKitDirectory'/LeapSDK/lib/x64/ . These files should be copied to your /usr/lib and the configuration/bulid path (if using IntelliJ IDE -> 'Edit Configurations'->'Application'->'configuration'->'VM options'->"-Djava.library.path=/usr/lib") should be appropriately stated.

Save and run your application.

bhaskar
  • 1
  • 4
0

I had this problem, what solved it was adding -Djava.library.path=/Path/to/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib to the command line call for the .jar file. (make sure your developer kit is the right version)

So rather than:

 java -jar leapMotionProgram.jar

It had to be:

java -jar -Djava.library.path=/Path/to/LeapDeveloperKit_2.3.1+31549_mac/LeapSDK/lib leapMotionProgram.jar
I McD
  • 13
  • 4