[使用APSTEX IFC Framework的IfcJava3DViewer时的java.lang.NoClassDefFoundError

问题描述 投票:0回答:1

我正在使用APSTEX IFC Framework在我的Java程序中创建IFC 3D Viewer。我的代码如下。

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)

如何纠正错误?

java noclassdeffounderror ifc
1个回答
0
投票

感谢以上两个表扬,可以帮助我解决问题。通过安装JOGL库,程序可以工作。

© www.soinside.com 2019 - 2024. All rights reserved.