I'm trying to build a jogl app. I downloaded the jars and the native dll files. I have included them in my buildpath but when I run my code I get a the error from the title
Here is my vm file:
-server
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Djava.library.path="C:\Users\Vlad\Documents\dev\jogamp-all-platforms\lib\windows-amd64"
Here is that folder:
Here are the jars that I have in my build path:
And finally if there is any need for the actual code here it is:
import javax.media.opengl.GLCanvas;
import javax.media.opengl.GLCapabilities;
import javax.swing.*;
/**
* on 20/02/14.
*/
public class Demo extends JFrame {
static Demo app = new Demo();
public static void main(String[] args)
{
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
app.setVisible(true);
}
});
}
public Demo(){
super("This is my first jogl app");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GLCapabilities caps = new GLCapabilities();
GLCanvas canvas = new GLCanvas(caps);
canvas.addGLEventListener(new MyGLListener());
getContentPane().add(canvas);
}
}
EDIT
I have changed the libraries to match the new ones:
As you can see I have the natives and the jogl-all.jar and even the gluegen-rt.jar library.
The error that I get now is a compiler error:
This is the piece of code that's causing it:
GLCanvas canvas = new GLCanvas(new GLCapabilities());
It says that GLCapabilites (GLProfiles) in GLCapabilties cannot be applied to ();
You may also need to include gluegen-rt.jar
in your build path. You should be able to obtain this from the same place where you found jogl-all.jar
(JOGL 2).
Regarding your edit, for simplicity, you can use:
GLCanvas canvas = new GLCanvas(new GLCapabilities(null));
This will allow you to use the default GLProfile
.