Java:如何解决 java.lang.UnsatisfiedLinkError:java.library.path 中没有 J3D

发布于 2024-12-12 18:49:08 字数 717 浏览 1 评论 0原文

当我尝试运行 Java 3d 程序时,出现以下错误。

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no J3D in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)

我按照这个网站解决了这个错误

http://www.filsa.net/2008/07/17/eclipse-java3d-and-javalibrarypath/

它说,添加 jar 文件后 此外,您需要将本机代码 j3dcore-ogl.dll(Linux 上的 j3dcore-ogl.so)放入 PATH 中。

我已经在下面找到了这些dll文件 j3d-1_5_2-windows-i586\bin\j3dcore-ogl.dll 文件夹

我通过这种方式从 Eclipse 添加了此支持 Java 构建路径 ---> 添加外部类文件夹 --> 以及 bin 路径(正是在这些路径中) dll 文件驻留)

也执行此步骤后,我得到了相同的异常。 这就是我的 Eclipse IDE 构建路径现在的样子 在此处输入图像描述

非常感谢。

when i tried to run a Java 3d PROGRAM , it gave me the following error .

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no J3D in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)

I followed this web site to solve this error

http://www.filsa.net/2008/07/17/eclipse-java3d-and-javalibrarypath/

It says that , after adding the jar files
Additionally, you need to put the native code, j3dcore-ogl.dll (j3dcore-ogl.so on Linux) onto the PATH.

I have got these dll files under the
j3d-1_5_2-windows-i586\bin\j3dcore-ogl.dll folder

I added this support from Eclipse this way Java Build Path --->Add Exernal Class Folder -->and upto bin path (Exactly there at which these dll files are residing )

After doing this step also , i am getting the same exception .
This is how my Eclipse IDE build path looks now
enter image description here

Thank you very much .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

冷情妓 2024-12-19 18:49:08

我解决了这个问题,非常简单:

只需复制&粘贴和合并 j3d 库的 bin/ & lib/ 文件夹放入相应的 bin/ & jre/ 和 jre/ 的 lib/ 文件夹jdk/ 您使用的 JVM 文件夹。

  1. 从 https://java3d.java.net/binary-builds.html 下载相应的 j3d Zip 二进制文件。对于我来说,一个 win7 64 位 Java VM(又名 jdk & jre),我选择 j3d-1_5_2-windows-amd64.zip
  2. 解压缩下载的 j3d Zip 二进制文件 (j3d-1_5_2-windows-amd64.zip) 以获取其中的 j3d-jre.zip 文件。
  3. 解压缩 j3d-jre.zip 以获取 bin/ & lib/ 文件夹。
  4. 复制&粘贴和合并得到的bin/ & lib/ 文件夹放入相应的 bin/ &我的 JVM 文件夹的 lib/ 文件夹(也称为 jdk/ 和 jre/ 文件夹)。

对于其他 JVM,这是同样的事情 - 复制和复制粘贴和合并 j3d zip 库的 bin/ & lib/ 文件夹放入相应的 bin/ & JVM 的 jre/ & 的 lib/ 文件夹jdk/

I solved the question, very easy:

Just copy & paste & merge the j3d library's bin/ & lib/ folders into the corresponding bin/ & lib/ folders of both the jre/ & jdk/ JVM folders that you use.

  1. Download corresponding j3d Zip binaries at https://java3d.java.net/binary-builds.html. For me, a win7 64bit Java VM (aka. jdk & jre), I choose j3d-1_5_2-windows-amd64.zip.
  2. UnZip the downloaded j3d Zip binaries (j3d-1_5_2-windows-amd64.zip) to get the j3d-jre.zip file inside.
  3. UnZip the j3d-jre.zip to get the bin/ & lib/ folders.
  4. Copy & paste & merge the obtained bin/ & lib/ folders into the corresponding bin/ & lib/ folders of my JVM folders (aka. both jdk/ & jre/ folders).

For other JVMs, it's the same thing - copy & paste & merge the j3d zip library's bin/ & lib/ folders into the corresponding bin/ & lib/ folders of the JVM's jre/ & jdk/

温柔一刀 2024-12-19 18:49:08

您可以尝试从运行菜单执行regsvr32“name_of_dll-file”吗?您需要重新启动机器才能生效。

这会将 DLL 添加为其他程序可以访问的库。将其添加到 Eclipse 构建路径并不是正确的做法,因为它只能由您的 JVM 访问。

Can you try executing regsvr32 "name_of_dll-file" from the run menu? You need to reboot the machine for this to take effect.

This adds the DLL as a library that other programs can access. Adding it to the Eclipse build path is not the right thing since that will only be accessible to your JVM.

终弃我 2024-12-19 18:49:08

将.dll文件复制到Windows/system32文件夹,然后按(Windows + R)启动(运行)

,在字段中输入regsvr32“dll_name”

“dll_name”是bin文件夹中的文件名图书馆的。

Copy .dll file to Windows/system32 folder, then press (Windows + R) to start (Run)

in the field, type regsvr32 "dll_name"

"dll_name" is the name of the file in bin folder of the library.

十雾 2024-12-19 18:49:08

我通过将 j3dcore-ogl.dll 复制到 windows/system32 文件夹解决了问题

i solved problem by copying j3dcore-ogl.dll to windows/system32 folder

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文