java 插件项目里面使用JFram 后就报这个错?没有找到类?但是我单独跑的时候就可以跑起来。 5C

Exception in thread "main" java.lang.NoClassDefFoundError: default (wrong name: Default)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.awt.FontConfiguration$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.FontConfiguration.getFontCharsetEncoder(Unknown Source)
at sun.awt.FontConfiguration.buildFontDescriptors(Unknown Source)
at sun.awt.FontConfiguration.getFontDescriptors(Unknown Source)
at sun.awt.FontConfiguration.getFontDescriptors(Unknown Source)
at sun.awt.PlatformFont.(Unknown Source)
at sun.awt.windows.WFontPeer.(Unknown Source)
at sun.awt.windows.WToolkit.getFontPeer(Unknown Source)
at java.awt.Font.getPeer_NoClientCode(Unknown Source)
at java.awt.Font.getPeer(Unknown Source)
at sun.awt.windows.WComponentPeer._setFont(Native Method)
at sun.awt.windows.WComponentPeer.setFont(Unknown Source)
at sun.awt.windows.WWindowPeer.initialize(Unknown Source)
at sun.awt.windows.WFramePeer.initialize(Unknown Source)
at sun.awt.windows.WComponentPeer.(Unknown Source)
at sun.awt.windows.WCanvasPeer.(Unknown Source)
at sun.awt.windows.WPanelPeer.(Unknown Source)
at sun.awt.windows.WWindowPeer.(Unknown Source)
at sun.awt.windows.WFramePeer.(Unknown Source)
at sun.awt.windows.WToolkit.createFrame(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at Jtable.JTableDiag.(JTableDiag.java:41)
at test111.test.main(test.java:21)

5个回答

很明显的啊 报这个错误就是缺少包

queshaobao

很明显的啊 报这个错误就是缺少包

很明显的啊 报这个错误就是缺少包

这个是没有找到对应文件。你看下是不是有类文件名叫 Default啊,可能该名称为内置关键字,不能用呢

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!