lsl_archived
lsl_archived copied to clipboard
Java error (Unable to load library 'liblsl64.dylib':)
Hello i am trying to follow basic instructions to get Java examples working. Running code
java -Djna.nosys=true -cp "jna-4.2.2.jar:src" examples.SendData
or/and
java -Djna.nosys=true -cp "jna-4.2.2.jar:src" examples.ReceiveData
I got below error;
Creating a new StreamInfo...
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'liblsl64.dylib': Native library (darwin/liblsl64.dylib) not found in resource path (jna-4.2.2.jar:src)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:277)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403)
at com.sun.jna.Library$Handler.
Using mac sierra 10.13.3.
Help...
@Abdulghany
After our conversation on Slack, I noticed that, in the liblsl_1.12-MacOS.zip file I pointed you to, the liblsl64.dylib file is just a symlink to liblsl64.1.4.0.dylib. They both need to be next to each other in the same folder for liblsl64.dylib to work.
This should solve your Matlab problem. As for Java, I don't know where the libraries are supposed to go so that the java loader can find them. It looks like it should go in a folder named darwin that is "in resource path" but I don't know where the resource path is.
For the sample, it is easiest to put the library in LSL/liblsl-Java. It just has to be somewhere on the path, and in the current directory always works.
@cboulay putting the two files together in java got it working, Thank you. However the matlab problem still persist