gpt4 book ai didi

使用APSTEX IFC框架的IfcJava3DViewer时出现java.lang.NoClassDefFoundError

转载 作者:行者123 更新时间:2023-12-01 19:47:48 25 4
gpt4 key购买 nike

我正在使用 APSTEX IFC 框架在我的 Java 程序中创建 IFC 3D 查看器。我的代码如下。

import com.apstex.ifcjava3dviewer.IfcJava3DViewer;

public class JavaViewer2 {
public static void main(String[] args) {
IfcJava3DViewer ifcViewer = new IfcJava3DViewer();
}
}

错误如下:

java.lang.NoClassDefFoundError: com/jogamp/opengl/GLCapabilitiesImmutable
at com.apstex.javax.media.j3d.Pipeline$PipelineCreator.run(SourceFile:74)
at com.apstex.javax.media.j3d.Pipeline$PipelineCreator.run(SourceFile:1)
at java.security.AccessController.doPrivileged(Native Method)
at com.apstex.javax.media.j3d.Pipeline.b(SourceFile:91)
at com.apstex.javax.media.j3d.MasterControl.c(SourceFile:858)
at com.apstex.javax.media.j3d.VirtualUniverse.<clinit>(SourceFile:267)
at com.apstex.gui.core.controller.ApplicationController.<init>(SourceFile:1097)
at com.apstex.gui.core.kernel.Kernel.getApplicationController(SourceFile:59)
at com.apstex.ifcjava3dviewer.IfcJava3DPanel.<init>(SourceFile:71)
at com.apstex.ifcjava3dviewer.IfcJava3DViewer.<init>(SourceFile:38)
at test.main.JavaViewer2.main(JavaViewer2.java:7)
Caused by: java.lang.ClassNotFoundException: com.jogamp.opengl.GLCapabilitiesImmutable
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.apstex.javax.media.j3d.VirtualUniverse
at com.apstex.javax.media.j3d.Canvas3D.<clinit>(SourceFile:3821)
at com.apstex.gui.ifc.views.view3d.j3d.ModelViewer.<init>(SourceFile:93)
at com.apstex.gui.ifc.views.view3d.j3d.ModelViewer.<init>(SourceFile:79)
at com.apstex.ifcjava3dviewer.IfcJava3DPanel.<init>(SourceFile:1079)
at com.apstex.ifcjava3dviewer.IfcJava3DViewer.<init>(SourceFile:38)
at test.main.JavaViewer2.main(JavaViewer2.java:7)

如何纠正错误?

最佳答案

感谢楼上两位的指点,帮我解决了问题。通过安装 JOGL 库,程序可以运行。

关于使用APSTEX IFC框架的IfcJava3DViewer时出现java.lang.NoClassDefFoundError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59110039/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com