Peter
Peter

Reputation: 9

Java JOGL Compiling Error

I get an error when I try to run my JOGL code, here is the code:

import javax.media.opengl.GLCapabilities;
public class Jogl {
   public static void main (String args[]) {
      try {
         System.loadLibrary("jogl");
         System.out.println(
            "Hello World! (The native libraries are installed.)"
         );
        GLCapabilities cap = new GLCapabilities(null);
        System.out.println(
            "Hello JOGL! (The jar appears to be available.)"
         );
      } catch (Exception e) {
         System.out.println(e);
      }
   }
}

The error is:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1119) at Jogl.main(Jogl.java:5)

I have just gone through the JOGL installation tutorial on their wiki.

Upvotes: 1

Views: 346

Answers (1)

gouessej
gouessej

Reputation: 4105

You don't have to call System.loadLibrary("jogl"), GlueGen does it for you. Please strictly follow our instructions in our wiki. We indicate nowhere that the developer must load the native libraries by himself, it isn't necessary in the general case. If you don't want to use the automatic extraction and loading of native libraries, look at our user's guide, disable it and set your Java library path correctly. Look at that, don't forget GlueGen.

The questions specific to JOGL should be asked on our official forum so that our maintainers, contributors and users can answer you. Only a very few JogAmp maintainers come here.

Upvotes: 0

Related Questions