JOGL在重新安装ubuntu后无法工作



我在ubuntu 9中有一个完整的eclipse项目。现在我已经安装了Ubuntu 10.10,取回了备份,下载了Eclipse并尝试运行该项目。

项目文件夹根本没有更改!但现在它不起作用了:

线程"AWT-EventQueue-0"java.lang.UnsisfiedLinkError中出现异常:java.library.path 中没有gluegen rt

如果我转到"项目属性>java构建路径>库",gluegen-rt.jar和jogl.jar都存在,并且我没有编译错误(">import javax.media.xinlg.GLAutoDrawable;"没有错误,所以我认为类加载正确)

我也试着从synaptic安装JOGL。

这里是完整的错误堆栈:

线程"AWT-EventQueue-0"中出现异常java.lang.UnsisfiedLinkError:nojava.library.path中的gluegen-rtjava.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)在java.lang.Runtime.loadLibrary0(Runtime.java:840)在java.lang.System.loadLibrary(System.java:1047)在com.sun.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102)在com.sun.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)在com.sun.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)在java.security.AccessController.doPrivileged(本机方法)com.sun.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)在com.sun.gluegen.runtime.NativeLibrary.ensureNativeLibLoaded(NativeLibrary.java:399)在com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:163)在com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:129)在com.sun.xinlg.impl.x11.DRIHack.beggin(DRIHack.java:109)在com.sun.xinlg.impl.x11.X11GLDrawableFactory.(X11GLDrawable Factory.java:99)位于java.lang.Class.forName0(本机方法)java.lang.Class.forName(Class.java:186)在javax.media.ongle.GLDrawableFactory.getFactory(GLDrawableFactory.java:111)在javax.media.xinkle.GLJPanel.initialize(GLJPanel.java:889)在javax.media.xinkle.GLJPanel.paintComponent(GLJPanel.java:488)在javax.swing.JComponent.paint(JComponent.java:1029)在javax.swing.JComponent.paintChildren(JComponent.java:866)在javax.swing.JComponent.paint(JComponent.java:1038)在javax.swing.JComponent.paintChildren(JComponent.java:866)在javax.swing.JComponent.paint(JComponent.java:1038)在javax.swing.JComponent.paintChildren(JComponent.java:866)在javax.swing.JComponent.paint(JComponent.java:1038)在javax.swing.JComponent.paintChildren(JComponent.java:866)在javax.swing.JComponent.paint(JComponent.java:1038)在javax.swing.JComponent.paintChildren(JComponent.java:866)在javax.swing.JComponent.paint(JComponent.java:1038)在javax.swing.JLayeredPane.paint(JLayeredPane.java:581)在javax.swing.JComponent.paintChildren(JComponent.java:866)在javax.swing.JComponent.paintToOffscreen(JComponent.java:5145)在javax.swing.BufferStrategyPaint Manager.paint(BufferStrategyPaint Manager.java:302)在javax.swing.RepaintManager.paint(RepaintManager.java:1145)在javax.swing.JComponent.paint(JComponent.java:1015)在java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallack.java:39)在sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallack.java:78)在sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallack.java:115)在java.awt.Container.paint(Container.java:1844)在javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:751)在javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:696)在javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:676)在javax.swing.RepaintManager.access$700(RepaintManager.java:57)在javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1550)在java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)在java.awt.EventQueue.dispatchEventImpl(EventQueue.java:647)在java.awt.EventQueue.access$000(EventQueue.java:96)在java.awt.EventQueue$1.run(EventQueue.java:608)在java.awt.EventQueue$1.run(EventQueue.java:606)在java.security.AccessController.doPrivileged(本机方法)java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)在java.awt.EventQueue.dispatchEvent(EventQueue.java:617)在java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)在java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)在java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)在java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

我发现了问题!

ECLIPSE保存外部爪的绝对路径

在eclipse项目属性->Java构建路径中,转到您的库,找到gluegen-rt.jar,展开它,然后单击Native library Location,并输入JOGL下载附带的本地库的位置。

重新安装ubuntu后,我更改了主文件夹结构。

这帮助我了解了如何让Eclipse使用http://processing.org)。我知道processing有自己的编辑器,但它的功能不是很丰富。

所以我出现了这个错误:

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

所以我不得不在"项目资源管理器"中右键单击jogl.all.jarjar文件,单击"属性",单击"本地库"并设置"位置路径"。

我的定位路径是:

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

在那之后,它完美地工作了!

最新更新