eclipse插件编程中的“Workbench尚未创建”错误
随着我的eclipse插件启动,我得到Root exception:java.lang.IllegalStateException: Workbench has not been created yet.
错误。
并且它似乎导致副作用使一些包exception错误。 我不认为我的代码使用egit模块。
org.osgi.framework.BundleException: Exception in org.eclipse.egit.ui.Activator.start() of bundle org.eclipse.egit.ui. at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
如何删除此错误? 这是访问工作区的代码。 我发现这篇文章 – 调试失败的Eclipse启动说它是竞争条件,但我不确定为什么我有竞争条件,如果是这样,如何删除它。
public void renameClassRefactor() throws CoreException { // get the project information with ResourcesPlugin IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); // 1. The name of the project in the workspace System.out.println(ResourcesPlugin.getWorkspace().toString()); java.io.File workspaceDirectory = root.getLocation().toFile(); System.out.println(workspaceDirectory.toString());
我为“完成工作台尚未创建”而苦苦挣扎。
但我通过以下步骤得到了解决方案.-
- 转到运行配置 – >删除所有目标平台jar。
- 单击“添加必需的包”。
- 检查
org.apache.felix.gogo.runtime
,org.apache.felix.gogo.shell
,org.eclipse.equinox.console
,org.eclipse.osgi
和您的jar文件。 - 最后也是重要的一步。 转到设置 – > 选中 “ 启动前清除配置区域 ”复选框。
- 立即运行OSGi应用程序。
- 享受它是否适合你,因为它对我有用。
谢谢
参考此站点 ,我可以在运行配置中添加-clean
参数以删除错误消息。
- LocalDate – 如何删除LocalDate中的字符’T’
- 使用DatePicker和TimePicker对话框 – Eclipse中的Android Java
- 使用Eclipse在Manifest文件中构建ClassPath变量
- 带有eclipse错误的maven“路径必须包含项目和资源名称”
- HTTP状态500 – Servlet的Servlet.init()调度程序抛出exception
- 无法在终端中找到XML架构命名空间错误的Spring NamespaceHandler
- 当试图在rt.jar中显示类的Javadoc时,Eclipse会超时
- 我可以将eclipse源文件夹转换为包吗?
- 尝试使用扫描仪时“无法解析为类型”