JOGL Tutorials

Getting Started With JOGL and Scala

Setting up with Eclipse

First Steps:

Assumptions:

  • You already have Scala installed on the computer
  • You will be using any version of eclipse to manage your code

First thing you need to do is go to (http://jogamp.org/jogl/doc/HowToBuild.html). This will give you a list of all prerequisites to install before building or installing JOGL. If you want to build from source code, follow the guide on that page. If you do not want to build from source you will not need Ant or Git. You will need all of the developer libraries listed on the page to run the code for your particular flavor of Linux.

Next, go to (http://jogamp.org/deployment/webstart/archive/) and download the latest .7z file for your computer specification. At the time of writing, the file in question will say "jogl-2.0-b23-20110303-(os stuff here)" Just make sure you download the file starting with "jogl" and not another. Now you will want to open eclipse, and remember where your files were downloaded to.

Start a new project, Right click on Properties -> Java Build Path -> Add Library -> Choose "User Library" -> Click on "User Libraries"
This is the place where you will define a custom library that you can share with all of your projects that will use JOGL. Just click on "New", give it a name, and then click on "Add JARS", the JAR files you will want will be in the downloaded .7z file. Uncompress that file and go into the /jars subdirectory. The jars you will need are the following:

  • gluegen-rt.jar
  • jogl.all.jar
  • nativewindow.all.jar
  • newt.all.jar

After you have added those jars to the new library, expand the library using the arrow to the left. You will see all of the jars you just added. Now expand each of those JARS. For each of those Jars, you will need the native library location. This is just simply the file path to all of the .so files. So select "Native Library Location" and click Edit. The location of the .so files are located in /lib subfolder of the downloaded files. It will be the same path name for all of the respective Jar's native library location.

After you have finished that, click Ok. Select your newly made Library and click Finish. Now you have a User Library that you can attach to all your JOGL projects! To make sure, you can double check your Project's build path. If the Libraries Tab contains your new library, then you are all done, if not, just add it. Now you are ready to start making some JOGL code run!