OSGi上的java.lang.NoClassDefFoundError [英] java.lang.NoClassDefFoundError on OSGi
问题描述
在Eclipse上运行作为插件项目它可以正常运行。当我戴上Felix它不再工作了。
它显示:
java.lang.NoClassDefFoundError:com / griep / ui / MainFrame
但是MainFrame位于同一个包中当然,激活器是一个公共类。我不明白为什么类加载器没有找到类。
任何人都知道什么是发生?
确保将 javax.swing
包导入你的包:
Import-Package:javax.swing
I have a bundle, with an activator declared. This activator create a JFrame and show it.
Running on Eclipse as Plugin project it works fine. When I put on Felix it doesn't work anymore. It shows: java.lang.NoClassDefFoundError: com/griep/ui/MainFrame
But MainFrame is located in the same bundle the activator is, as a public class, of course. I don't understand why the classloader isn't finding the class.
Anyone knows what is happening?
Make sure you import the javax.swing
package into your bundle:
Import-Package: javax.swing
这篇关于OSGi上的java.lang.NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!