Hi! some errors occur in my platform [message #452734] |
Thu, 24 March 2005 04:54 |
Eclipse User |
|
|
|
Originally posted by: JohnnyYunFei.msn.com
when i programmed in eclipse using swt/jface,the runtime errors poped up!
case followed:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/eclipse/core/runtime/ISafeRunnable
at cas.lu.ui.FileExplorer.<init>(FileExplorer.java:38)
at cas.lu.ui.MainFrame.<init>(MainFrame.java:31)
at cas.lu.ui.MainFrame.main(MainFrame.java:42)
btw:the boot.jar,runtim.jar,and also workbench.jar is added into the path
furthermore,when i remove the applicationwindow (which is extended by
mainclass )from the snippet,errors go away too!
public class TestWindow extends ApplicationWindow {
//public class TestWindow {
/**
* @param arg0
*/
public TestWindow(Shell shell) {
super(shell);
// TODO Auto-generated constructor stub
//Display display=Display.getDefault();
//Shell shell=new Shell(display);
}
/* (non-Javadoc)
* @see
org.eclipse.jface.window.Window#createContents(org.eclipse.s wt.widgets.Compo
site)
*/
protected Control createContents(Composite parent) {
// TODO Auto-generated method stub
// TestGroup testGroup=new TestGroup(parent,SWT.NONE);
Shell shell=getShell();
shell.setBackground(new Color(null, 200, 200, 200));
shell.setLayout(new FillLayout());
TestGroup testGroup=new TestGroup(shell,SWT.SHADOW_ETCHED_IN);
// testGroup.setLocation(10,10);
// shell.open();
while(!shell.isDisposed()) {
if(!Display.getCurrent().readAndDispatch()) {
Display.getCurrent().sleep();
}
}
return parent;
}
public static void main(String[] args) {
Display display=Display.getDefault();
Shell shell=new Shell(display);
TestWindow app=new TestWindow(shell);
app.setBlockOnOpen(true);
app.open();
Display.getCurrent().dispose();
}
}
|
|
|
Powered by
FUDForum. Page generated in 0.03277 seconds