As i found several descriptions on the web how to do this, and only a mixture of them worked, here’s the a guide on setting up processing with opengl in eclipse. This assumes you have eclipse installed and downloaded the processing libraries already. Also I set it up on OSX, so paths might differ a bit on other systems:

  1. go to your project properties -> build path -> add external jars, and add the following four:
    – /PATHTOPROCESSING/Resources/Java/core.jar
    – /PATHTOPROCESSING/Resources/Java/libraries/opengl/library/opengl.jar
    – /PATHTOPROCESSING/Resources/Java/libraries/opengl/library/jogl.jar
    – /PATHTOPROCESSING/Resources/Java/libraries/opengl/library/gluegen-rt.jar
  2. still in the “add external jars” section, unfold jogl.jar, and add the native library location
    /PATHTOPROCESSING/Resources/Java/libraries/opengl/library/
  3. create a new run configuration (run as … ), and add the following vm argument
    Djava.library.path=/PATHTOPROCESSING/Resources/Java/libraries/opengl/library
This makes opengl work for me in eclipse and gets rid of that pesky NoClassDefFound: Dynamic Lookup error.