Creating a JOGL Eclipse Project

Below is a how to create an eclipse project for JOGL project,

Why isnt it on github….well since eclipse takes full paths of the src directories, you would need to practicaly re-do it after fetching the project.

1- After downloading the source code, create an eclipse workspace in the jogl directory ..or anywhere else.
2- Create a new Java project (jogl-eclipse) with jdk_6u21…
3- Now delete the src forder from package explorer which will remove it from the disk as well.
4- Go to Project –> Properties

a- In the Java Build Path menu:

Under Source Tab: Link the following sources “…” is the path to your jogl directory.

…/src/jogl/classes  –> jogl
../build/jogl/gensrc/classes –> jogl gensrc
…/src/nativewindow/classes –> nativewindow
…/build/nativewindow/gensrc/classes –> nativewindow gensrc
…/src/newt/classes –> newt
…/build/newt/gensrc –> newt gensrc
…/jogl/src/junit –> junit

finally add,
GLUEGEN_HOME/src/java/ –>gluegen common
with the following as excluded paths “com/sun/” and “net/”

In the Libraries tab: add the following as external jars

ant-junit.jar (apache-ant/lib)
gluegen-rt.jar (…/build/jar)
junit.jar (GLUGEN_PATH/make/lib)

b- In the Builders menu:
Add a new Ant Builder: (optional to build from eclipse) with:

Buildfile: …/make/build.xml
Base Directory: …/make

You can then specify the targets if you want. For me I disabled the ant builder and use the command line :) . You can also add the egit plugin…good for visualizing changes (reporting) but kinda of slow. You will get some errors in the gensrc code from extra semicolon… should be fixed in the emitter

And your done!

, ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>