我正在学习rcp开发,目前我尝试将一些SWT小部件导入到e4 RCP应用程序中,但我遇到了问题。
我找到了XYGraph组件here的罐子,从lars Vogel的教程中,我学会了在RCP应用程序中导入一些罐子:我在eclipse中创建了一个“来自jar的项目”,我把它放入所有的罐子(不仅是上面提到的那些,还有来自星云项目的其他罐子,但它与我得到的问题无关)。 然后,我在我的RCP应用程序的清单文件中添加了带有jar的插件项目(在依赖项选项卡中)。 之后,我在我的part文件中添加了正确的“import”语句,并且一切都应该很好......但是当我启动RCP应用程序时(从产品文件中)我收到此错误: java.lang.NoClassDefFoundError:org / eclipse / draw2d / IFigure 在第51行
这是我的RCP @postConstruct文件:箭头显示第51行
@PostConstruct
public void postConstruct(Composite parent) {
parent.setLayout(new FillLayout(SWT.HORIZONTAL));
Canvas canvas = new Canvas(parent, SWT.NONE);
LightweightSystem lws = new LightweightSystem(canvas);
// create a new XY Graph.
XYGraph xyGraph = new XYGraph(); <---- line 51
xyGraph.setTitle("Simple Example");
// set it as the content of LightwightSystem
lws.setContents(xyGraph);
// create a trace data provider, which will provide the data to the
// trace.
CircularBufferDataProvider traceDataProvider = new CircularBufferDataProvider(
false);
traceDataProvider.setBufferSize(100);
traceDataProvider.setCurrentXDataArray(new double[] { 10, 23, 34, 45,
56, 78, 88, 99 });
traceDataProvider.setCurrentYDataArray(new double[] { 11, 44, 55, 45,
88, 98, 52, 23 });
// create the trace
Trace trace = new Trace("Trace1-XY Plot", xyGraph.primaryXAxis,
xyGraph.primaryYAxis, traceDataProvider);
// set trace property
trace.setPointStyle(PointStyle.XCROSS);
// add the trace to xyGraph
xyGraph.addTrace(trace);
}
你对这个错误的根源有所了解吗?
编辑: 这里有4个文件:
NebulaJars (jars plugin): MANIFEST.MF
https://paste.ofcode.org/mchNUQdCpGde3Tf2yKp8Qr
NebulaJars (jars plugin): build.properties
https://paste.ofcode.org/J6UHffTrjvGfWvHSqunQks
RCP project:
MANIFEST.MF
https://paste.ofcode.org/hR7ZkU85qXAqBPjTam53nV
build.properties
https://paste.ofcode.org/DWEc8SV9U85rHMKk4Eb9X3