Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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

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

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:

[[FAQ_How_do_I_add_an_extra_library_to_my_project%26%23146%3Bs_classpath%3F]]


FAQ_My_runtime_workbench_runs,_but_my_plug-in_does_not_show._Why?


[[FAQ_When_does_PDE_change_a_plug-in%26%23146%3Bs_Java_build_path%3F]]


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.