我正在尝试在 Windows 上使用 Eclipse 4.3.0 创建 Eclipse RCP 应用程序。
作为引用,我阅读了 Lars Vogel 的文章“Eclipse 产品和部署 - 教程”http://www.vogella.com/tutorials/EclipseProductDeployment/article.html 本教程未提供任何代码,但我引用了它并遵循以确保遗漏了某些内容。但它是。 出了什么问题?
我使用多页编辑器向导创建插件项目。
我可以从 plugin.xml
启动并在 Eclipse IDE 运行时中看到新的插件功能。
然后按照教程创建 .product 文件,
和 Application
类及其生成的方法(start
和 stop
)
public class Application implements IApplication {
但是当使用 .product Overview 中的“Launch an Eclipse application”时,我得到了
!SESSION Fri Jan 10 13:22:34 CST 2014 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2014-01-10 13:22:34.195
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:633)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
这看起来类似于旧的 Eclipse 问题 java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter 这没有帮助。
使用“Eclipse 产品导出向导”时,我在 eclipse
文件夹中获取文件。但是当启动我的 todo.exe 时,有对话框
Java was started but returned exit code=13
我在 configuration
文件夹中找到了日志
!SESSION Fri Jan 10 13:46:19 CST 2014 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2014-01-10 13:46:19.008
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.RuntimeException: Could not find framework
at org.eclipse.equinox.launcher.Main.getBootPath(Main.java:992)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:571)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
出了什么问题?
我还查看了以下类似故事的问题 How to make simplistic RCP application really standalone? (这也没有得到答复), 但它没有给我任何线索。
最后在写这个问题时,StackOverflow 给我一些类似的建议(会再看一遍)
最佳答案
也许查看 RCP 项目设置的最简单方法是使用 New > Plug-in Project
向导提供的示例之一。
在向导的第二页上,选择This plug-in will make contributions to the UI
以及 Yes
for Would you like to create a 3. x 富客户端应用程序
。
通过这些设置,向导的第三页应提供三个 RCP 示例。
注意:这会创建您提到的教程中涵盖的旧样式 3.x RCP,还有新的 e4
样式 RCP。 e4 RCP 对您可以使用的现有 Eclipse 代码有限制,但具有其他优点(详细介绍 here)。
关于java - 使用 Lars Vogel "Eclipse Products and Deployment - Tutorial"创建 Eclipse RCP 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21037230/