我正在尝试在Java项目中使用JZY3D库。
从基础开始,我设置了以下main():
public static void main(final String[] args) {
new GLCapabilities(GLProfile.getDefault());
}
jogl-all.jar,glugengen-rt.jar和glugengen.jar文件位于构建路径中。我得到以下异常:
Exception in thread "main" java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initSingleton()V
at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1444)
at javax.media.opengl.GLProfile.access$100(GLProfile.java:76)
at javax.media.opengl.GLProfile$1.run(GLProfile.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:140)
at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:199)
at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:1914)
at javax.media.opengl.GLProfile.get(GLProfile.java:815)
at javax.media.opengl.GLProfile.getDefault(GLProfile.java:602)
at javax.media.opengl.GLProfile.getDefault(GLProfile.java:613)
at eu.crisis_economics.abm.model.SpecsCompetitionStrategyCFO.main(SpecsCompetitionStrategyCFO.java:312)
看来3d库存在问题,但我无法弄清楚是什么。
jogl-all.jar,glugengen-rt.jar和glugengen.jar文件位于构建路径中。我得到以下异常:
从构建路径中删除gumgen.jar。确保在运行时也将这两个jar添加到类路径中!您只需要在编译时和运行时运行jogl-all.jar和胶原-rt.jar(rt ==运行时)。
你也需要有匹配的本地罐子的副本gluegen-RT-natives- os.and.arch .jar和JOGL-全natives- os.and.arch的.jar你使用旁边gluegen-RT平台.jar和jogl-all.jar http://jogamp.org/jogl/doc/deployment/JOGL-DEPLOYMENT.html#NativeJARFiles
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句