Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsjava.lang.NoClassDefFoundError: org/eclipse/core/resources/ResourcesPlugin
https://www.eclipse.org/forums/index.php/mv/msg/487276/1058087/#msg_1058087
I hope you can help, I'm at the end of my rope. I am writing a very simple headless plugin (extending org.eclipse.core.runtime.applications). The sole purpose of this plugin is import existing sample projects into Eclipse from the command line.
I know that there is a plugin in cdt which already does this. However, this is part of an installer, so can not be allowed to fail and pop up any dialogs.
The relevant code in my IApplication's start() method is:
When I try to run this using "eclipse -consoleLog -data C:\Android\eclipse\workspace -noSplash -application com.xxx.eclipse.headless.import -project C:\Android\eclipse\workspace\helloworld", I get the following error:
!ENTRY org.eclipse.osgi 4 0 2013-05-10 14:11:38.508
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/core/resources/ResourcesPlugin
at com.xxx.eclipse.headless.Import.importProject(Import.java:97)
at com.xxx.eclipse.headless.Import.start(Import.java:60)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.resources.ResourcesPlugin
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more
I don't understand what the problem could be. I have declared the dependency correctly. What am I missing?