Java &引用;“工作台尚未创建”;eclipse插件编程中的错误
启动eclipse插件后,我得到了Java &引用;“工作台尚未创建”;eclipse插件编程中的错误,java,eclipse,plugins,workspace,Java,Eclipse,Plugins,Workspace,启动eclipse插件后,我得到了根异常:java.lang.IllegalStateException:Workbench尚未创建。错误 而且它似乎会导致一些包异常错误的副作用。我认为我的代码没有使用egit模块 org.osgi.framework.BundleException: Exception in org.eclipse.egit.ui.Activator.start() of bundle org.eclipse.egit.ui. at org.eclipse.osgi.
根异常:java.lang.IllegalStateException:Workbench尚未创建。
错误
而且它似乎会导致一些包异常错误的副作用。我认为我的代码没有使用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)
如何删除此错误?这是访问工作区的代码。我发现说这是种族条件,但我不确定为什么我有种族条件,如果有,如何删除它
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());
参考,我可以在运行配置中添加-clean
参数来删除错误消息
为了“工作台尚未创建”这一整天,我做了很多努力 但我通过以下步骤得到了解决方案-
org.apache.felix.gogo.runtime
,org.apache.felix.gogo.shell
,org.eclipse.equinox.console
,org.eclipse.osgi
和您的jar文件