Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Hi! some errors occur in my platform
Hi! some errors occur in my platform [message #452734] Thu, 24 March 2005 04:54
Eclipse UserFriend
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();
}
}
Previous Topic:Latest SWT Integration Builds fail JUnit tests?
Next Topic:GC.setAlpha(int)
Goto Forum:
  


Current Time: Fri Apr 26 00:36:29 GMT 2024

Powered by FUDForum. Page generated in 0.03277 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top