Login  Register

setting up JOGL in Eclipse on Mac OSX Lion / Frustration

Posted by TC on Oct 19, 2011; 8:53pm
URL: https://forum.jogamp.org/setting-up-JOGL-in-Eclipse-on-Mac-OSX-Lion-Frustration-tp3435692.html

So I've gone through about 3 different tutorials I've found on the net and I have a few questions.

1. What jars do I put in my user library in Eclipse? Right now I have gluegen-rt.jar, jogl.all.jar, newt.event.jar, and            nativewindow.core.jar.

After that I set the Native User Library to my lib folder.

Using this code I found in a tutorial:

import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.media.opengl.*;
import javax.media.opengl.awt.GLCanvas;

public class SimpleScene {
    public static void main(String[] args) {
        GLProfile glp = GLProfile.getDefault();
        GLCapabilities caps = new GLCapabilities(glp);
        GLCanvas canvas = new GLCanvas(caps);

        Frame frame = new Frame("AWT Window Test");
        frame.setSize(300, 300);
        frame.add(canvas);
        frame.setVisible(true);
       
        // by default, an AWT Frame doesn't do anything when you click
        // the close button; this bit of code will terminate the program when
        // the window is asked to close
        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                frame.dispose();
                System.exit(0);
            }
        });
    }
}

I get this error message:

Exception in thread "main" java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initialize()V
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1198)
        at javax.media.opengl.GLProfile.access$000(GLProfile.java:71)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:112)
        at java.security.AccessController.doPrivileged(Native Method)


So I'm lost at the moment. Any hep would be great