Help with JOCL on Mac

796 views Asked by At

I am trying to run this tutorial on my mac.

The tutorial is for windows, and packs jocl version 1.3 (JOCL-0.1.3a-beta.jar) and the native jocl dll for windows (JOCL-windows-x86_64.dll).

After getting the code, I basically got rid of the jocl 1.3 jar and the dll and substituted it with the latest jocl 1.4 jar, that should pack resources for both mac and windows.

Afer doing this, when I run the tutorial I get the following error:

Error while loading native library "JOCL-apple-x86_64" with base name "JOCL"
Operating system name: Mac OS X
Architecture         : x86_64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.NullPointerException: No resource found with name '/lib/libJOCL-apple-x86_64.dynlib'

Looks like the libJOCL-apple-x86_64.dynlib dynamic library is missing from the resources of the jar.

I am not a Java expert and I have no idea what to try next.

Any help appreciated!

2

There are 2 answers

2
mbien On BEST ANSWER

i don't know much about jocl.org (i am the author of http://jocl.jogamp.org) but it looks like all you should need is in the lib folder. It could be a bug of jocl.org to try to load libJOCL-apple-x86_64.dynlib instead of libJOCL-apple-x86_64.jnilib on your mac. But thats only a wild guess.

0
Marc Mielke On

use jar to extract the archive & rename /lib/libJOCL-apple-x86_64.jnilib to /lib/libJOCL-apple-x86_64.dynlib . then re-package using jar again.