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

Difference between revisions of "FAQ Why doesn't my plug-in build correctly?"

 
m
Line 12: Line 12:
 
Be careful, as the classpath consists mainly  
 
Be careful, as the classpath consists mainly  
 
of hard-coded file system locations.  
 
of hard-coded file system locations.  
 
 
  
 
To recompute the classpath, use the context menu
 
To recompute the classpath, use the context menu
Line 20: Line 18:
 
construct a build classpath specific to your Eclipse installation
 
construct a build classpath specific to your Eclipse installation
 
and workspace contents.
 
and workspace contents.
 
 
  
 
If your plug-in relies on other broken plug-ins in your workspace,
 
If your plug-in relies on other broken plug-ins in your workspace,
Line 29: Line 25:
 
try '''Project >Clean...''' to force everything to be rebuilt
 
try '''Project >Clean...''' to force everything to be rebuilt
 
from scratch.
 
from scratch.
 
 
 
 
  
 
== See Also: ==
 
== See Also: ==
 
+
*[[FAQ_How_do_I_set_up_a_Java_project_to_share_in_a_repository%3F]]
 
+
*[[FAQ_What_is_the_classpath_of_a_plug-in%3F]]
[[FAQ_How_do_I_set_up_a_Java_project_to_share_in_a_repository%3F]]
+
 
+
 
+
[[FAQ_What_is_the_classpath_of_a_plug-in%3F]]
+

Revision as of 21:49, 30 May 2006

It is important to realize that a plug-in consists of a manifest description written in XML and an independent implementation written in Java. The plugin.xml file defines the prerequisite plug-ins and effectively defines the classpath for your own plug-in classes. A typical build problem is caused by a change to the build classpath, often indirectly owing to a change to the plugin.xml file. This may happen when you extract a plug-in out of CVS, for instance. The classpath settings are copied from the CVS repository but were put there by someone who may have had a different installation location for Eclipse. Be careful, as the classpath consists mainly of hard-coded file system locations.

To recompute the classpath, use the context menu on your project: PDE Tools > Update Classpath. This will instruct PDE to look at your plugin.xml file and construct a build classpath specific to your Eclipse installation and workspace contents.

If your plug-in relies on other broken plug-ins in your workspace, your plug-in may not be able to build itself. Start with the offending plug-in and work your way up the dependency hierarchy to find the problem. When all else fails, try Project >Clean... to force everything to be rebuilt from scratch.

See Also:

Back to the top