I'm having troubles working out the dependencies for Jzy3d for my Android Studio project. The stack trace leading to the error is:
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:454)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:59)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:90)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:328)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:390)
at com.jogamp.common.os.Platform$2.run(Platform.java:249)
at java.security.AccessController.doPrivileged(AccessController.java:45)
at com.jogamp.common.os.Platform.loadGlueGenRTImpl(Platform.java:231)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:183)
at com.jogamp.common.os.Platform.initSingleton(Platform.java:258)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:99)
at javax.media.opengl.GLProfile.isAvailable(GLProfile.java:284)
at org.jzy3d.chart.Settings.<init>(Settings.java:19)
at org.jzy3d.chart.Settings.getInstance(Settings.java:48)
at org.jzy3d.chart.Chart.<init>(Chart.java:60)
at org.jzy3d.chart.Chart.<init>(Chart.java:48)
While crawling through the stack trace, I found the following line in Platform.run:249
GlueJNILibLoader.loadLibrary("gluegen-rt", false, Platform.class.getClassLoader());
So my best guess is that it's trying to load my gluegen-rt.jar, but for some reason is unable to find it.
I've included gluegen-rt in my libs directory
I also attempted to add libgluegen-rt.so to src/main/jniLibs and changed my .grade to include
compile fileTree(dir: 'libs', include: ['*.jar','*.so'])
So basically my question is where is the error? Is it within the inability to load my gluegen-rt.jar, or it's inability to load libgluegen-rt.so? Is the issue caused from me missing a different library?
The code that starts the problem is calling the chart constructor from the Jzy3d libary
Chart chart = new Chart(Quality.Advanced);
Down the line of method calls the following line is executed
GLProfile.isAvailable("GL2")
The lines of code that are used within gluegen-rt are
protected static synchronized boolean loadLibrary(String var0, boolean var1, ClassLoader var2) {
return loaderAction != null?loaderAction.loadLibrary(var0, var1, var2):false;
}