UnsatisfiedLinkError:java.library.path中没有j3dcore-ogl

时间:2023-01-22 09:05:46

I have a project in eclipse, runs perfectly fine in the ide when I click run, but I need to export it into a runnable jar file which also works fine. But when I try to run it it throws an exception:

我在eclipse中有一个项目,当我点击运行时在ide中运行得非常好,但是我需要将它导出到一个可运行的jar文件中,该文件也能正常工作。但是当我尝试运行它时会引发异常:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dcore-ogl in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1856)
    at java.lang.Runtime.loadLibrary0(Runtime.java:845)
    at java.lang.System.loadLibrary(System.java:1084)
    at javax.media.j3d.NativePipeline$1.run(NativePipeline.java:231)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.media.j3d.NativePipeline.loadLibrary(NativePipeline.java:200)
    at javax.media.j3d.NativePipeline.loadLibraries(NativePipeline.java:157)
    at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:987)
    at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:299)
    at javax.media.j3d.GraphicsConfigTemplate3D.getBestConfiguration(GraphicsConfigTemplate3D.java:321)
    at java.awt.GraphicsDevice.getBestConfiguration(GraphicsDevice.java:207)
    at com.sun.j3d.exp.swing.JCanvas3D.<init>(JCanvas3D.java:228)
    at com.sun.j3d.exp.swing.JCanvas3D.<init>(JCanvas3D.java:178)
    at mainproject.MainPanel.<init>(MainPanel.java:72)
    at mainproject.MainWindow.<init>(MainWindow.java:42)
    at mainproject.MainWindow.main(MainWindow.java:23)

I have been googling it for 2 days now, tons of results, none helpful. I export it by going to file->export->java->Runnable jar file->i bubble extract required libraries into generated jar, choose the correct configuration, save the file in a specified folder, then it saves just fine. Or at least so I think. The java.library.path goes to the jre lib folder, but when i run it in eclipse it goes to the .so for j3d, i tried changing it using System.setProperty but to no success. I have a feeling that is the problem, but when I tried to fix it nothing happened. I'm using the most up to date java3d library (1.5.2 I believe).

我现在谷歌搜索了2天,结果很多,没有任何帮助。我通过转到file-> export-> java-> Runnable jar文件导出它 - >我将生成的jar提取所需的库,选择正确的配置,将文件保存在指定的文件夹中,然后保存就好了。或者至少我认为。 java.library.path转到jre lib文件夹,但是当我在eclipse中运行它时会转到.so for j3d,我尝试使用System.setProperty更改它但没有成功。我有一种感觉就是问题,但是当我试图修复它时,没有任何事情发生。我正在使用最新的java3d库(我相信1.5.2)。

Any suggestions?

1 个解决方案

#1


0  

You can find good answers in question problems with java3D lib configuration especially markoz (https://*.com/users/2657704/markoz) and JohnnyO (https://*.com/users/208065/johnnyo) ones.

你可以找到有关java3D lib配置问题的好答案,尤其是markoz(https://*.com/users/2657704/markoz)和JohnnyO(https://*.com/users/208065/johnnyo)。

#1


0  

You can find good answers in question problems with java3D lib configuration especially markoz (https://*.com/users/2657704/markoz) and JohnnyO (https://*.com/users/208065/johnnyo) ones.

你可以找到有关java3D lib配置问题的好答案,尤其是markoz(https://*.com/users/2657704/markoz)和JohnnyO(https://*.com/users/208065/johnnyo)。