I have read the FAQ for UnsatisfiedLinkErrors but my problem was not solved. Here is the console output;
/home/alex/AMD-APP-SDK-v2.4-lnx64/lib/x86_64/
Obtaining platform...
Error while loading native library "JOCL-linux-x86_64" with base name "JOCL"
Operating system name: Linux
Architecture : amd64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.UnsatisfiedLinkError: /tmp/libJOCL-linux-x86_643195663378429660897.so: libOpenCL.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at org.jocl.LibUtils.loadLibraryResource(LibUtils.java:161)
at org.jocl.LibUtils.loadLibrary(LibUtils.java:83)
at org.jocl.CL.<clinit>(CL.java:47)
at org.jocl.samples.JOCLSample.main(JOCLSample.java:59)
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: no JOCL-linux-x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at org.jocl.LibUtils.loadLibrary(LibUtils.java:93)
at org.jocl.CL.<clinit>(CL.java:47)
at org.jocl.samples.JOCLSample.main(JOCLSample.java:59)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load the native library
at org.jocl.LibUtils.loadLibrary(LibUtils.java:117)
at org.jocl.CL.<clinit>(CL.java:47)
at org.jocl.samples.JOCLSample.main(JOCLSample.java:59)
The first line outputs java.library.path and it is correct but the error still says “libOpenCL.so.1” does not exist.