Hello friends, I am running the following code in eclipse but getting a class not found exception:
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class DialogClass {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("TEst");
Shell frame = new Shell(SWT.SHELL_TRIM);
PublishGenericArtefactDialog publishGenericArtefactDialog =
new PublishGenericArtefactDialog(frame);
publishGenericArtefactDialog.setTitle("Test");
if (publishGenericArtefactDialog.open() == Window.CANCEL){
try {
throw new Exception("Cancelled");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
and error i am getting is
TEst
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IStatus
at DialogClass.main(DialogClass.java:19)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IStatus
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 1 more
need help