java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initSingleton()V

后端 未结 2 1629
萌比男神i
萌比男神i 2020-12-21 12:30

I am trying to use the JZY3D libraries in my Java project.

Starting with the basic, I set up the following main():

public static void main(final Stri         


        
2条回答
  •  天命终不由人
    2020-12-21 13:00

    Have you tried the Maven dependency instead of add those jars by hand?

    I made a clean maven project, add a new user library with the following files:

    • org.jzy3d-0.9.jar
    • dependencies/misc/opencsv-2.1.jar
    • dependencies/misc/org.convexhull.jar
    • dependencies/misc/swt.jar
    • dependencies/misc/swt-debug.jar

    After that, I add the following maven dependencies:

    
      org.jogamp.gluegen
      gluegen-rt-main
      2.0.2
    
    
      org.jogamp.jogl
      jogl-all-main
      2.0.2
    
    

    Build & Run with no exceptions.


    A much cleaner solution is:

    • Clone Jzy3D repository (https://github.com/jzy3d/jzy3d-api)
    • install jzy3d-master
    • add the jzy3d-api dependency for your project

提交回复
热议问题