JOGL异常 - 在java.library.path中找不到gluegen- rt [英] JOGL Exception- Can't find gluegen- rt in java.library.path

查看:942
本文介绍了JOGL异常 - 在java.library.path中找不到gluegen- rt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

线程main中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有gluegen-rt在java.lang.ClassLoader.loadLibrary中的
(ClassLoader.java:1860)在java的
.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader) .java:102)
at com.jogamp.gluegen.runtime.NativeLibLoader.access $ 000(NativeLibLoader.java:51)
at com.jogamp.gluegen.runtime.NativeLibLoader $ 1.run(NativeLibLoader.java :70)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
at com.jogamp .common.jvm.JVMUtil。(JVMUtil.java:56)
at javax.media.opengl.GLProfile。(GLProfile.java:1051)
at HelloWorld.main(HelloWorld.java:14)

Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:102) at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51) at com.jogamp.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70) at java.security.AccessController.doPrivileged(Native Method) at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68) at com.jogamp.common.jvm.JVMUtil.(JVMUtil.java:56) at javax.media.opengl.GLProfile.(GLProfile.java:1051) at HelloWorld.main(HelloWorld.java:14)

每当我尝试运行教程JOGL文件时,我都会得到这个可爱的异常。我拼命想尽我所能。为jogl和gluegen添加所有可能的库包括:

So i get this lovely exception everytime I try to run a tutorial JOGL file. I have desperately tried everything I could. Adding all possible libraries for jogl and gluegen including:

jogl.jar
jogl.all.jar
jogl natives
gluegen natives
gluegen和jogle natives for macosx

jogl.jar jogl.all.jar jogl natives gluegen natives gluegen and jogle natives for macosx

一切,它说没有gluegen库,尽管显然有。 -.-我读了一些关于jnilib文件的地方,并尝试将它们放入带有jar文件的文件夹中,但仍然没有运气。

Everything, and it says that there is no gluegen library though there obviously is. -.- I read somewhere about jnilib files and tried putting them into the folders with the jar files, but still no luck.

顺便说一句,我正在使用Eclipse。

I am using Eclipse, by the way.

推荐答案

在尝试运行应用程序时,必须告诉操作系统在哪里可以找到gluegen-rt本机库可以通过编辑Eclipse中的运行配置来设置适当的环境变量。我在Linux上开发,对我来说步骤是

The OS has to be told where to find the gluegen-rt native library when it tries to run the application, which you can do by editing the "run configuration" in Eclipse to set the appropriate environment variable. I develop on Linux, and for me the steps are


  • 右键单击项目资源管理器中的主类

  • 选择运行方式 - >运行配置...

  • 选择环境选项卡

  • 点击新建...

  • 输入名称: LD_LIBRARY_PATH 和值: / usr / lib64 / jogl:/ usr / lib64 / gluegen

  • 点击确定,申请,运行

  • right-click on the main class in the project explorer
  • select Run As -> Run Configurations...
  • select the Environment tab
  • click "New..."
  • enter Name: LD_LIBRARY_PATH and Value: /usr/lib64/jogl:/usr/lib64/gluegen
  • click "OK", "Apply", "Run"

在Mac OSX上,您可能必须使用 DYLD_FALLBACK_LIBRARY_PATH DYLD_LIBRARY_PATH 而不是 LD_LIBRARY_PATH ,JOGL和Gluegen库的位置会有所不同。这些是包含本机库的目录,在Linux上的名称以 .so 结尾,我相信Mac上的 .jnilib OSX。

On Mac OSX you will probably have to use DYLD_FALLBACK_LIBRARY_PATH or DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH, and the location of the JOGL and Gluegen libraries will be different. These are the directories containing the native libraries, with names ending in .so on Linux and I believe .jnilib on Mac OSX.

这篇关于JOGL异常 - 在java.library.path中找不到gluegen- rt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆