简体   繁体   中英

How to use old JOGL versions for jzy3d?

I found out about jzy3d today, and it looks exactly like what i need for my current school project (which is about drawing a surface in 3D, related to hydrogeology). I downloaded the demo (ver. 0.9.1) , but when i try to run it (more specifically the 3d surface demo aka this code ), i get the following error :

 Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/opengl/GLProfile
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:44)
at TestGraph.getChart(TestGraph.java:36)
at TestGraph.main(TestGraph.java:42)
Caused by: java.lang.ClassNotFoundException: javax.media.opengl.GLProfile

at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more

From what i understood looking around on the internet, it might be linked to the fact that jzy3d requires and old version of JOGL, so i downloaded jogamp-windows-amd64.7z (2.0-rc3 archive...it seems to be OK, since it contains the javax.media.* instead of the com.jogamp.*). I'm totally new when it comes to importing .jar on eclipse, so i simply followed this pattern with the above files. I do have now a java project named OldJOGL containing jogl.all.jar and gluegen-rt.jar.

I then added OldJOGL as a required project in all my jzy3d (api, core, etc.) projects (imported via maven), and OldJOGL + all the jzy3d projects as required projects in "TestGraph" (containing a single class where i basically copied the code given in the demo). Yet it still displays the same error message !

I'm most likely doing something wrong, hence my question : how can i make jzy3d use the old JOGL version ? (and is it the real problem?)

Thanks in advance

PS: sorry if my english is sometimes awkward, it's not my lative language :(

You should contact Martin Pernollet so that he updates Jzy3D to support JOGL 2.3.2. If he doesn't have enough time to do it, contact me on the JogAmp forum, I'll make a pull request and he'll provide you a version supporting JOGL 2.3.2 and later. I confirm that the current source code doesn't work with the later version of JOGL: https://github.com/jzy3d/jzy3d-api/blob/master/jzy3d-api/src/api/org/jzy3d/chart/Settings.java#L3

"javax.media" no longer exists in JOGL.

您可以使用版本1.0.0来解决此兼容性问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM