将eclipse插件导出为Deployed plug-ins and fragments
时失败并提示:
现象
将eclipse插件导出时失败,根据提示打开log
1. ERROR in D:\workspace\com.test.myplugin\src\com\test\myplugin\Environment.java (at line 5)
import org.eclipse.jdt.core.IJavaElement;
^^^^^^^^^^^^^^^
The import org.eclipse.jdt cannot be resolved
似乎是import org.eclipse.jdt有问题,但在工程中,org.eclipse.jdt.core.IJavaElement对应的jar包已经导入且编译正常
解决方法
原因还没找到,但有解决方法。
在Deployed plug-ins and fragments
,打开Options选项卡,钩选Use class files compiled in the workspace