gpt4 book ai didi

java - 重装ubuntu后JOGL不起作用

转载 作者:行者123 更新时间:2023-12-02 08:15:02 24 4
gpt4 key购买 nike

我在 ubuntu 9 上用 eclipse 有一个完整的工作项目。现在我已经安装了 Ubuntu 10.10,恢复了备份,下载了 Eclipse 并尝试运行该项目。

项目文件夹根本没有改变!但现在不行了:

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;”没有错误,所以我认为类已正确加载)

我也尝试从 synaptic 安装 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)

最佳答案

我发现了问题!

ECLIPSE 保存外部 JAR 的绝对路径

在 Eclipse 项目属性 -> Java 构建路径中,转到您的库,找到gluegen-rt.jar,展开它,然后单击“ native 库位置”并输入 JOGL 下载附带的 native 库的位置.

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

关于java - 重装ubuntu后JOGL不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6593892/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com