Trouble compiling JOGL with NEWT

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble compiling JOGL with NEWT

FortisVenaliter
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.
Reply | Threaded
Open this post in threaded view
|

Re: Trouble compiling JOGL with NEWT

gouessej
Administrator
FortisVenaliter wrote
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.
Where did you get the JARs? Have you taken the JARs containing the native libraries too?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Trouble compiling JOGL with NEWT

FortisVenaliter
Got them from:
http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z

Yes, I copied the native ones for windows, which is how I got it running great with swing.  After I switched to NEWT, and had this problem, I actually copied the whole archive of JARs to make sure none were getting excluded.

Also, I should mention that I set up JOGL as a separate project that references these libraries, then had my main project reference that one as per this guide: http://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE
Reply | Threaded
Open this post in threaded view
|

Re: Trouble compiling JOGL with NEWT

Sven Gothel
Administrator
In reply to this post by FortisVenaliter
On 06/14/2013 07:38 PM, FortisVenaliter [via jogamp] wrote:

> 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.
All that (missing stuff) is included in gluegen-rt.jar (com.jogamp.common.**)
so I don't really know whats wrong :(

I can run selected NEWT unit tests on the RaspPi using gluegen-rt.jar
and jogl-all.jar, it picks up the native jars .. and all is good. hmm.

Well, I haven't tried eclipse on the rasp-pi, IMHO too expensive for
the little guy.

Maybe you double check whether 'your' gluegen-rt.jar contains the
missing classes and is properly referenced in you commandline
java invocation.
Yes, go commandline 1st IMHO.

~Sven



signature.asc (911 bytes) Download Attachment