Jump to: navigation, search

FAQ What causes my plug-in to build but not to load in a runtime workbench?

Revision as of 14:50, 14 March 2006 by Claffra (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Here is a typical scenario for a new user: You are writing a plug-in that extends plug-in XYZ. To get it to compile, you add a reference to the JAR file for plug-in XYZ to your project’s build path either from the Java Build Path property page or by editing the .classpath file. When you launch a runtime workbench, the following surprising error is reported: java.lang.NoClassDefFoundError: XYZ.SomeClass. Do not start looking in the Plug-ins and Fragments tab in the launch configuration for the runtime workbench. That tab influences only which plug-ins are used for your runtime workbench and whether they are loaded from the workspace or from the Eclipse install directory.

Instead, start looking in the plug-in manifest. Edit the plugin.xml file and ensure that XYZ is mentioned as a required plug-in. Then, save the plugin.xml file. This will update the project’s build path automatically.

Never manually edit the .classpath file when you are writing a plug-in. The plug-in Manifest Editor simply overwrites any changes you make to it. Not very civilized, but that is the way it works.

See Also: