Login  Register

Trouble compiling JOGL with NEWT

Posted by FortisVenaliter on Jun 14, 2013; 5:38pm
URL: https://forum.jogamp.org/Trouble-compiling-JOGL-with-NEWT-tp4029416.html

Hello everyone,

I am trying to get JOGL to run on my Raspberry Pi, as Java2D simply wasn't cutting it.  I'm fairly familiar with OpenGL and graphics pipelines, but my Java is a bit rusty.  I am using Eclipse.

So, I tried first to use swing components with a GLCanvas.  Worked great on windows, but I got the following error on the Pi:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.media.nativewindow.DefaultGraphicsConfiguration cannot be cast to com.jogamp.nativewindow.awt.AWTGraphicsConfiguration
at javax.media.opengl.awt.GLCanvas chooseGraphicsConfiguration(GLCanvas.java:1096)

So, I read somewhere that JOGL will only work in the Pi with NEWT.  So, I tried to follow a tutorial or two, but as soon as I add the import line for com.jogamp.newt.opengl.GLWindow, it gives the following build errors:

The type com.jogamp.common.util.locks.RecursiveLock cannot be resolved. It is indirectly referenced from required .class
or
The type com.jogamp.common.type.WriteCloneable cannot be resolved. It is indirectly referenced from required .class files

I have both gluegen-rt.jar and jogl-all.jar included.  What am I missing?  I've been searching for hours and it's driving me mad.