Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: JOGL problem

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,600
    Thanks
    24
    Thanked 313 Times in 293 Posts

    Default JOGL problem

    I have imported and I am attempting to run an example program from NASA World Wind (it's a mapping API). I have also recently upgraded to Java 7.
    My IDE is Springsource (it is built on top of Eclipse, so Eclipse for all intensive purposes) and I am using Maven for dependency management. When running the example, I am getting the following error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
    	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
    	at java.lang.Runtime.loadLibrary0(Runtime.java:849)
    	at java.lang.System.loadLibrary(System.java:1088)
    	at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
    	at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
    	at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
    	at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
    	at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
    	at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
    	at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:190)
    	at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
    	at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
    	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
    	at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
    	at gov.nasa.worldwind.awt.WorldWindowGLCanvas.<init>(Unknown Source)
    	at com.apmsoftware.airlinegame.application.web.gui.panels.flight.FlightOverviewMapPanelTest.main(FlightOverviewMapPanelTest.java:30)

    I somewhat understand what the exception is telling me: it cannot find jogl. Where I'm lost is that I am not sure WHERE it is looking. I do not know if "java.library.path" is referring to the system JAVA_HOME variable, Eclipse's default java version, or Maven's default java version. They all should be the same, but that is not an assumption I want to lock in until I have a better understanding of what is going on, considering that I just did the update to Java 7's JDK. Does anyone have any ideas? The internet has been pretty ambiguous for my specific situation.
    Also, does anyone know how I would go about getting JOGL? If it was a normal dependency exception, I would just add it to the Maven POM, but this sounds more like a JDK thing than a project-specific dependency thing.
    Any thoughts or ideas?
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/


  2. #2
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,225
    Thanks
    176
    Thanked 817 Times in 760 Posts
    Blog Entries
    5

    Default Moving

    Have you downloaded JOGL and added it to the classpath? For the basic configuration, I believe at a minimum it needs 4 jars
    jogl-all.jar
    jogl-all-natives*
    gluegen-rt.jar
    gluegen-rt-natives*

  3. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,600
    Thanks
    24
    Thanked 313 Times in 293 Posts

    Default Re: JOGL problem

    I believe the Maven Dependencies for the library is supposed to download jogl automatically. I can confirm that jogl-1.5.jar and gluegen-1.5.jar is in the project's target libs folder after performing a Maven Install. I can also confirm that jogl-1.5 and gluegen-1.5 is included as a Maven Dependency for the project.
    I am trying to get more help from the forums for the library itself, but my email account was auto-banned during registration (god knows why). I am trying to get it unbanned so I can post my question there.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  4. #4
    Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    381
    Thanks
    0
    Thanked 64 Times in 54 Posts

    Default Re: JOGL problem

    Might it be that the native libraries can not be found?
    In that case you would need something like this before you use any JOGL classes:
    	public static void setLibraryPath(String path) throws SecurityException, UnsatisfiedLinkError, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
    		System.setProperty("java.library.path", path);
    		final Field sysPathsField = ClassLoader.class.getDeclaredField("sys_paths");
    		sysPathsField.setAccessible(true);
    		sysPathsField.set(null, null);
    	}
    This is a little hack used to change the library path. I use it all the time when working with LWJGL.

Similar Threads

  1. Trying to get Jogl to work
    By jwcoleman in forum What's Wrong With My Code?
    Replies: 2
    Last Post: September 14th, 2012, 01:06 AM
  2. Mendelbrot set implementation using JOGL
    By Kalyan in forum Member Introductions
    Replies: 0
    Last Post: March 29th, 2011, 05:53 PM
  3. JOGL Problem
    By Brt93yoda in forum What's Wrong With My Code?
    Replies: 6
    Last Post: September 9th, 2010, 07:04 PM
  4. JOGL
    By helloworld922 in forum Java IDEs
    Replies: 3
    Last Post: July 21st, 2009, 02:19 AM