分类:
2008-10-16 18:55:43
症状:
按照书上的方法,开发jface要加入以下jar包:
org.eclipse.jface.text**.jar
org.eclipse.jface_3**.jar
org.eclipse.core.runtime_3**.jar
org.eclipse.runtime.compatibility_3**.jar
org.eclipse.osgi_3**.jar
org.eclipse.core.commands_3**.jar
写了一个helloJface.java,编译没什么问题,但是运行就总是报错:
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressMonitor
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"
解决方法:
添加jar包:
org.eclipse.equinox.common_3.3.0.v20070426.jar
搞定