Using JOGL for Java OpenGL Programming in Eclipse
PreliminariesThis tutorial will teach you how to install JOGL in Eclipse for OpenGL programming in JavaThis tutorial assumes that you have familiarity with Java programming and the Eclipse development environment. It also assumes that you have downloaded and installed Eclipse.
Step ZeroDownload the appropriate version of JOGL:
jogl for Windows (x86) Unpack the archive in the desired location.
Step OneCreate a new project in Eclipse ("File->New->Java Project")
Step TwoOpen the Project Properties ("Project->Properties")
Step ThreeIn the Project Properties, select the "Java Build Path" item. In the options window, select the "Libraries" tab
Step FourPress the "Add External JARs..." button, and select "jogl.jar" in the "<<jogl-1.1.0>\lib\jogl.jar" directory. (where jogl-1.1.0 is the result of unpacking the archive downloaded in Step Zero.).
Step FivePress the small "+" next to jogl.jar in the list of libraries, this expands to show four options. Select the "Native library location:" option and press the "Edit" button. Select the "<<jogl-1.1.0>\lib" directory.
Step SixRepeat steps four and five, but this time select "gluegen-rt.jar"
You're Done!Your project should now be set up to compile and run Java OpenGL code using JOGL. |