FrontPanel Unsatisfied link error MacOS

I can’t seem to launch my java app with the OK front panel 5.2.11. I’m using VSCode. It compiles fine with the okFrontPanel.jar. Without the .dylib, I get the expected error:

Exception in thread “main” java.lang.UnsatisfiedLinkError: no okjFrontPanel in java.library.path

I add the libokjFrontPanel.dylib to my path. (Actually the file in the API download is “libokFrontPanel.dylb” and it’s looking for “libokjFrontPanel.dylib” so I renamed it.). There’s also a .jnilib file but I’m not sure it’s needed?

Now the error is:

Exception in thread “main” java.lang.UnsatisfiedLinkError: com.opalkelly.frontpanel.okjFrontPanelJNI.swig_module_init()V
at com.opalkelly.frontpanel.okjFrontPanelJNI.swig_module_init(Native Method)
at com.opalkelly.frontpanel.okjFrontPanelJNI.(okjFrontPanelJNI.java:678)
at com.opalkelly.frontpanel.okCFrontPanel.(okCFrontPanel.java:40)

Any ideas?

I did solve this issue. Both the .dylib and the .jnilib file need to be in the directory with the okFrontPanel.jar and that directory in the class path. (Do not rename).