eclipse 产品调用导致 org.eclipse.swt.SWTError 的 ClassNotFoundException
我发现了一个基于 eclipse-rcp 和 xtext 的不错的待办事项工具 (Sebastian Benz - Eclipse 任务编辑器)。我克隆了 git 存储库并导出了产品。不幸的是,我在启动 Eclipse 产品时遇到以下异常:
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 43 more
可以找到整个堆栈跟踪 (此处)。我发现一个人有同样的 异常 引起由一些错误的参数。我删除了所有这些,但例外仍然存在。您知道可能导致该问题的原因吗?谢谢你!
我在 Gnome/Linux 上使用 Eclipse Indigo Service Release 1 和以下 java 版本:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
I found a nice todo-tool that is based on eclipse-rcp and xtext (Sebastian Benz - Eclipse-Task-Editor). I cloned the git repository an exported the product. Unfortunately, I'm getting following exception as starting the eclipse product:
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 43 more
The entire stack trace can be found (here). I found a guy having the same exception caused by some wrong parameters. I removed all of them but the exception is still present. Do you have a clue what could cause the issue? Thank you!
I use Eclipse Indigo Service Release 1 on Gnome/Linux with the following java version:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许,应用程序在您的插件文件夹中找不到正确的 swt 库。你需要一个名为“org.eclipse.swt.gtk.linux.x86_64_xxxx.jar”的jar。你可以检查一下。
Maybe , the application not found the right swt lib in your plugin folder. you need a jar named "org.eclipse.swt.gtk.linux.x86_64_xxxx.jar". you can check it.
我通过编辑根 pom.xml 解决了“相同/相似”问题,如下所示:
I solved the 'same/a similar' problem by editing the root pom.xml like so:
不管你相信与否,我只需从不同的镜像下载相同版本的 Eclipse 就可以解决导出问题 - 最初我从滑铁卢大学下载它,第二次从宾夕法尼亚大学镜像下载。我在删除之前的 Eclipse 安装并在新实例上重新导入它们之前备份了这些项目。产品出口工作顺利。我正在为 RAP 和 RCP 开发人员使用 Eclipse 3.7.2 - Indigo。
Believe it or not, I was able to solve the export problem by simply downloading the same version of Eclipse but from a different mirror - initially I downloaded it from the U of Waterloo and the 2nd time around from the U of Pennsylvania mirror. I backed up the projects before blowing away the previous Eclipse installation and re-imported them on the new instance. The product export worked without a hitch. I am using Eclipse 3.7.2 - Indigo for RAP and RCP developers.