What's the best practice to deploy a Java app using LeapMotion?
There are a several options. I prefer to link the native libraries at runtime. My projects have this setup:
/lib/LeapJar.jar
/native/win/32/...dll
/native/win/64/...dll
/native/nux/32/...so
/native/nux/64/...so
/native/mac/....dylib
/MyApplication.jar
To link the native libraries, I implement the class NativeLibrary.java and call the method loadSystem
before the application starts:
public static void main(String[] args) {
NativeLibrary.loadSystem("native");
new MyApplication();
}
Actually, I tested it only for Windows 32/64, but it should work with every platform.