The API of JOCL is very similar to the original OpenCL API. So many of the online resources available for OpenCL may be applied directly to JOCL programs. Most of the OpenCL implementation come with a set of samples, which can serve as starting points for own programs. Some of these samples have also been ported to JOCL, and may be obtained in the samples section.

Most of the JOCL JavaDoc API documentation was extracted from the OpenCL Reference Pages from the Khronos OpenCL website.

Getting started

For the basic setup of JOCL, you have to follow these steps:
Jeff Heaton from Heaton Research has created this excellent article about setting up a basic project with JOCL, describing most of these steps in detail: Programming your Graphics Card (GPU) with Java & OpenCL

The 'Trouble Shooting' section of this article also mentions one the most frequent error messages when using JOCL (or any other Java binding for a native library): The famous UnsatisfiedLinkError. Although this currently targets only JCuda, maybe you find this FAQ Entry about the UnsatisfiedLinkError helpful if you also encounter this error.


If you have specific questions about JOCL, you may want to ask them in the JOCL Forum. Note that this forum is mainly about JOCL itself. Advanced questions about OpenCL programming in general may probably receive a greater attention in one of the forums dedicated to OpenCL:
If you have further comments, hints, suggestions or questions, feel free to contact me.