Search code examples
javaeclipsejoglubuntu-10.10

JOGL does not work after reinstalling ubuntu


i had a fully work project in ubuntu 9 with eclipse. Now i have installed Ubuntu 10.10, get the backup back, downloaded Eclipse and try to run the project.

The project folder was not changed at all! But now it does not work:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path

If i go to "project properties > java build path > libraries" gluegen-rt.jar and jogl.jar are present and i have no compilation error ("import javax.media.opengl.GLAutoDrawable;" has no error so classes are loaded correctly i think)

i tried to install JOGL from synaptic too.

Here the full error stacktrace:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681) at java.lang.Runtime.loadLibrary0(Runtime.java:840) at java.lang.System.loadLibrary(System.java:1047) at com.sun.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102) at com.sun.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51) at com.sun.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70) at java.security.AccessController.doPrivileged(Native Method) at com.sun.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68) at com.sun.gluegen.runtime.NativeLibrary.ensureNativeLibLoaded(NativeLibrary.java:399) at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:163) at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:129) at com.sun.opengl.impl.x11.DRIHack.begin(DRIHack.java:109) at com.sun.opengl.impl.x11.X11GLDrawableFactory.(X11GLDrawableFactory.java:99) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111) at javax.media.opengl.GLJPanel.initialize(GLJPanel.java:889) at javax.media.opengl.GLJPanel.paintComponent(GLJPanel.java:488) at javax.swing.JComponent.paint(JComponent.java:1029) at javax.swing.JComponent.paintChildren(JComponent.java:866) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintChildren(JComponent.java:866) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintChildren(JComponent.java:866) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintChildren(JComponent.java:866) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JComponent.paintChildren(JComponent.java:866) at javax.swing.JComponent.paint(JComponent.java:1038) at javax.swing.JLayeredPane.paint(JLayeredPane.java:581) at javax.swing.JComponent.paintChildren(JComponent.java:866) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5145) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:302) at javax.swing.RepaintManager.paint(RepaintManager.java:1145) at javax.swing.JComponent.paint(JComponent.java:1015) at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39) at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78) at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115) at java.awt.Container.paint(Container.java:1844) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:751) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:696) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:676) at javax.swing.RepaintManager.access$700(RepaintManager.java:57) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1550) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647) at java.awt.EventQueue.access$000(EventQueue.java:96) at java.awt.EventQueue$1.run(EventQueue.java:608) at java.awt.EventQueue$1.run(EventQueue.java:606) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.awt.EventQueue.dispatchEvent(EventQueue.java:617) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)


Solution

  • i found the problem!

    ECLIPSE SAVE ABSOLUTE PATH OF EXTERNAL JARS

    In your eclipse project properties -> Java Build Path, go to your library, find the gluegen-rt.jar, expand it, and click on Native Library Location and enter the location for the native libraries that came with your JOGL download.

    after reinstallin ubuntu i changed my home folder structures.