I’m trying to run a program, which uses JOGL for its GUI, in Jason. I’m getting the following error:
[CentralisedEnvironment] Error in Centralised MAS environment creation
net.java.games.jogl.GLException: java.lang.ClassNotFoundException: net.java.games.jogl.impl.macosx.MacOSXGLContextFactory
I think the problem is that it can’t find the jogl.jar file. Based on a number of tutorials I’ve found, I put it in the /lib/ext folder of my Java folder (/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext).
After this didn’t work, I set the DYLD_LIBRARY_PATH variable to include the JOGL lib folder (I typed export DYLD_LIBRARY_PATH=/Users/.../lib in a terminal, not sure if anything happened).
I’ve tried this with at least 3 different versions of JOGL and not one of them worked.
What am I missing? Please help!
Thanks in advance!
I’m not really sure what
DYLD_LIBRARY_PATHis. Sounds like you need to set the Javaclasspathvariable. Either that or you need to specify the path to the .jar file on execution using the-classpathor-cpflag (same thing). I’d say this is what you need to do.This page has a good description of where OS X looks for .jar files by default.
See the bottom of this Oracle tutorial and the Oracle page on setting the classpath for general coverage of options on how to define the classpath.
Also check here on using
DYLD_LIBRARY_PATH.