2011-07-06 86 views
0

我有一個完整的工作項目在Ubuntu 9與日食。現在我已經安裝了Ubuntu 10.10,取回備份,下載Eclipse並嘗試運行該項目。重新安裝Ubuntu後JOGL不工作

項目文件夾根本沒有改變! 但現在不工作:

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

如果我去「項目屬性> Java構建路徑>庫」 gluegen-rt.jar中和jogl.jar都存在,我沒有編譯錯誤(」 進口javax.media.opengl.GLAutoDrawable;「沒有錯誤,所以類正確加載我認爲)

我試圖從突觸也安裝JOGL。

這裏完整的錯誤堆棧跟蹤:

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)

回答

1

我發現這個問題!

ECLIPSE SAVE絕對路徑外部JAR

在Eclipse項目屬性 - > Java構建路徑,去你的圖書館,找到gluegen-rt.jar中,展開它,然後單擊本地庫位置並輸入JOGL下載附帶的本地庫的位置。

在重新安裝Ubuntu後,我改變了我的主文件夾結構。

+1

實際上,只要將包含本機庫的JAR放入與包含Java庫的JAR相同的目錄中,就不需要在使用JOGL 2時編輯本機庫位置。 – gouessej

1

這幫助我弄清楚如何讓Eclipse使用OpenGL的Processing Libraries(http://processing.org)。我知道處理有它自己的編輯器,但它不是很豐富。

所以我有這個錯誤:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path 

,所以我不得不右鍵點擊上的「工程資源管理器」的jogl.all.jar jar文件,點擊「屬性」,點擊「本地庫「並設置」位置路徑「。

我的位置路徑是:

/home/username/Desktop/processing-2.0a4/modes/java/libraries/opengl/library/linux32

之後,它的工作完美!

+0

jogl.all.jar已在JOGL 2中更名爲jogl-all.jar – gouessej