Java:如何解决 java.lang.UnsatisfiedLinkError:java.library.path 中没有 J3D
当我尝试运行 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
Thank you very much .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我解决了这个问题,非常简单:
只需复制&粘贴和合并 j3d 库的
bin/ & lib/
文件夹放入相应的bin/ & jre/ 和 jre/ 的 lib/
文件夹jdk/ 您使用的 JVM 文件夹。j3d-1_5_2-windows-amd64.zip
。j3d-1_5_2-windows-amd64.zip
) 以获取其中的j3d-jre.zip
文件。j3d-jre.zip
以获取bin/ & lib/
文件夹。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 correspondingbin/ & lib/
folders of both thejre/ & jdk/
JVM folders that you use.j3d-1_5_2-windows-amd64.zip
.j3d-1_5_2-windows-amd64.zip
) to get thej3d-jre.zip
file inside.j3d-jre.zip
to get thebin/ & lib/
folders.bin/ & lib/
folders into the correspondingbin/ & lib/
folders of my JVM folders (aka. bothjdk/ & jre/
folders).For other JVMs, it's the same thing - copy & paste & merge the j3d zip library's
bin/ & lib/
folders into the correspondingbin/ & lib/
folders of the JVM'sjre/ & jdk/
您可以尝试从运行菜单执行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.
将.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.
我通过将 j3dcore-ogl.dll 复制到 windows/system32 文件夹解决了问题
i solved problem by copying j3dcore-ogl.dll to windows/system32 folder