Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressMonitor at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 7 more
今日正在使用SWT和JFace开发一个系统,在搭建JFace平台时遇到了一个问题,运行HelloWorld程序抛出org.eclipse.core.runtime.IProgressMonitor的not found的异常。
上网上查找,发现时由于缺少必要的jar文件导致的,导入org.eclipse.equinox.common包,即可解决问题!
参考:SWT/JFace开发遇到org.eclipse.core.runtime.IProgressMonitor问题的解决办法_GeekDonie的博客-CSDN博客