Reputation: 1287
I've got a Maven project in NetBeans with various dependencies that allow me to plot some 3D charts/graphs (JOGL, Gluegen & JZY3D). These work fine if I run the project from NetBeans, but when I build the project into a JAR file, I get the following...
Exception in thread "Building 3D Scatter Plot" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:442)
Is this an issue with Maven/NetBeans not building the JAR with all the correct dependencies or have I missed something here?
Upvotes: 0
Views: 818
Reputation: 35829
In my opinion, it is searching for a dll (gluegen-rt.dll), which should be in the java library path.
You could add a dll dependency (you'll need to manually add it in your repo or Nexus):
<dependency>
<groupId>gluegen-rt</groupId>
<artifactId>gluegen-rt</artifactId>
<type>dll</type>
</dependency>
Upvotes: 0
Reputation: 8318
For dependencies on native libraries, the library must be in your PATH
or listed in the java.library.path
system property. You can pass that as an argument to java process like this: java -Djava.library.path=/path/to/dir
I think you might be missing this part when doing outside Netbeans.
Upvotes: 3