I have a project in eclipse, it works fine in the idea when I click run, but I need to export it to a jar executable, which also works fine. But when I try to run it, it throws an exception:
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’ve been sending it to Google for two days, tons of results, but nothing useful. I export it by going to file->export->java->Runnable jar file->i bubble extract required libraries into generated jar , select the correct configuration, save the file in the specified folder, and then save it in order. At least I think. java.library.path goes to jre lib folder , but when I run it in eclipse it goes to .so for j3d, I tried to change it using System.setProperty , but was not successful. I have a feeling that this is a problem, but when I tried to fix it, nothing happened. I am using the most modern java3d library (1.5.2 I believe) .
Any suggestions?
source share