Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2008-08-26 23:06:06
Right, I've solved this now. For anyone with a similar issue, here is my understanding of the situation:

To recap, I'm trying to get a minimal JOGL example working in an Eclipse RCP application. The application compiles fine, but craps out at runtime with "java.lang.NoClassDefFoundError: javax/media/opengl/GLEventListener". This seems like typical classpath fun and games, so I fart around and set my CLASSPATH environment variable (I'm on Win XP) to include the world and his wife, but of course it still doesn't work. I try putting all the JOGL crap in the "\jdk1.6.0_01\jre\lib\ext" directory. This not only doesn't solve the problem, but now it won't even build (Eclipse complains about Access Restriction on the JOGL stuff; great) - I know putting the JOGL stuff in here is naughty but I'm just trying to get it to work, so w/e.
What I didn't realise is that Eclipse ignores the CLASSPATH variable, so messing around with that is a waste of time. My understanding was that if you included a JAR in the Project > Properties > Libraries > Add External Jars bit, then Eclipse would sort out the CLASSPATH stuff for you, and certainly it adds some stuff to its little .classpath file, but it doesn't work at runtime, so there you go.
Anyway, I think this is some special wierdness of making an RCP application. I think you have to do Other Things to get the CLASSPATH sorted for external JARs in an Eclipse RCP application. Here's what I did:

Start a clean RCP Plug-In project in Eclipse. Add a lib directory to it. Put the gluegen-rt.jar and jogl.jar in there. Right-click on them in Eclipse and do 'Add to Build Path'. Right-click your MANIFEST.MF file and do 'Open With' > 'Plug-in Manifest Editor'. In the Manifest Editor select the Runtime tab. On there, under the Classpath bit click 'Add...', and select your lib/gluegen-rt.jar and lib/jogl.jar. That's it really. This is basically following the steps here:

http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg06980.html

To see some JOGL stuff, add a View and if you use the code from here it should work:

http://www.geofx.com/html/OpenGL_Eclipse/OpenGL_Eclipse.html

Hope this is helpful to someone.



2  Java Game APIs & Engines / JOGL Development / Re: How to: Getting started with JOGL on: 2008-08-25 22:31:34
Hi, I've read this thread and googled around, but I'm having a problem getting JOGl to run in an Eclipse project. I've followed the instructions here:

http://www.geofx.com/html/OpenGL_Eclipse/OpenGL_Eclipse.html

to make a simple Eclipse RCP application with a single View that implements GLEventListener, and basically the project builds OK, but when I run it I get the following exception:

java.lang.NoClassDefFoundError: javax/media/opengl/GLEventListener

Now, I have a directory called "C:\jogl-1.1.1-windows-i586" which is an unzip of the jogl-1.1.1-windows-i586.zip, and so contains the JOGl dlls and jars, and I have included the gluegen-rt.jar and jogl.jar from here in my Eclipse project.  As I say, Eclipse is happy with this and the project builds fine, and it can 'see' javax/media/opengl/GLEventListener, but it fails at runtime. I have tried adding "C:\jogl-1.1.1-windows-i586" and the "C:\jogl-1.1.1-windows-i586\lib" subdirectory to my Path environment variable, but I get the same error. Any help would be appreciated.

Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (38 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!