java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressMonitor
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)
Exception in thread "main"
请教!
------解决方案--------------------
未找到类,需要下载包
很多人说导入org.eclipse.core.runtime_x.x.x.jar 就ok,但你自己试试就知道并不是所有版本的org.eclipse.core.runtime_x.x.x.jar 里都有IProgressMonitor这个class.
所以即使你导入了org.eclipse.core.runtime_x.x.x.jar 到project也可能无济于事。
去plugins下面找找org.eclipse.equinox.common.x.x.x.jar,然后导入到project ,你会发现IProgressMonitor 悠然的躺在那里。