JOGL on Mac Snow Leopard

I’m trying to install JOGL on my Mac Snow Leopard OS. I want to use it with Eclipse Galileo. So far I have downloaded jogl.jar, gluegen-rt.jar, and the .jnlib files and put them into my System/Libraries/Java/Extension/ folder as well as my Libraries/Java/Extension/ folder. I have also included both jar files in the Build Path of my project and set the native libraries. However, I get the following error on all JOGL components I am trying to use:

Access restriction: The type GLEventListener is not accessible due to restriction on the required library /Library/Java/Extension/jogl.jar

I checked the Build Path and there seems to be no restrictions on the file. When i go to the jogl.jar and check its properties, it says I am able to read and write.

Please help :’( I need to fix this asap so I can start working on my program. If someone has a simple step-by-step tutorial (links to download files, how to set environment variables, etc) on how to set it up for Eclipse on Macs telling me exactly what I need to do to get everything working that would really help a lot.

You shouldn’t put all that in there. You don’t have access to the folder because it’s owned by the system (although it’s read-only so theoretically should be okay). So you can either be a nut job and change permissions for the folder (no!) or you can implement JOGL in your classpath specifically for your project.

Since you’re using Eclipse, here is how you do it:

  • Create your project
  • Drag the JAR files and the dylib files into your project in the browser on the left
  • Right click on the jar files and select Build Path > Add to Build Path

You should then be good to go.

Hi!

Rather follow this tutorial to install JOGL on Eclipse:
https://sites.google.com/site/justinscsstuff/jogl-tutorial-1

I advise you to use Eclipse Helios (3.6) instead of Eclipse Galileo if you plan to get JOGL from the GIT repository (EGIT requires Eclipse 3.6).

Ok, Thanks! I’ll try those out. One quick question though: After I put the files into the System/Library folder, I tried taking them out. This caused an error in all my projects because they are now missing the .jar files I took out. I tried removing them from the build path in Eclipse but it won’t let me. Is there any way to fix this?

You should be able to remove them from the build path just by right clicking and selecting to do so. If that doesn’t work for some reason, go the Properties menu for your project and do it from there.