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.
Difference between revisions of "Plug-in Development Environment"
(→Adding 3rd Party Jar files) |
(→Adding 3rd Party Jar files) |
||
Line 4: | Line 4: | ||
===Adding 3rd Party Jar files=== | ===Adding 3rd Party Jar files=== | ||
+ | ====Option 1: turn the jars into plug-ins==== | ||
− | + | Use New > Project > Plug-in Development > Plug-in from existing JAR archive. That will turn one or more jar files into a single jar plug-in. For something like log4j you can then set up Buddy-Classloading, etc. | |
− | + | Prior to 3.2.1, you had to make modifications to the build.properties file. See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=146042 bug 146042] (RCP export has problems with required plug-ins). | |
− | + | ====Option 2: include the jars in a plug-in==== | |
− | + | # Use Import>File System to import the jar files into your plug-in project, say in the <project>/lib directory. | |
− | + | ||
− | # Use Import>File System to import the jar files into your | + | |
# Use "Add..." to add the jars to the classpath section of the PDE Editor>Runtime tab. | # Use "Add..." to add the jars to the classpath section of the PDE Editor>Runtime tab. | ||
# Use "New..." to add "." library back (with no quotes, of course). Some versions of eclipse automatically do this for you. | # Use "New..." to add "." library back (with no quotes, of course). Some versions of eclipse automatically do this for you. |
Revision as of 08:44, 15 April 2007
Plug-in Development Environment (PDE) provides the tools on top of the JDT to develop plugins. It is a part of Eclipse SDK Project.
To debug your plugin you might try the Core Tools
Adding 3rd Party Jar files
Option 1: turn the jars into plug-ins
Use New > Project > Plug-in Development > Plug-in from existing JAR archive. That will turn one or more jar files into a single jar plug-in. For something like log4j you can then set up Buddy-Classloading, etc.
Prior to 3.2.1, you had to make modifications to the build.properties file. See bug 146042 (RCP export has problems with required plug-ins).
Option 2: include the jars in a plug-in
- Use Import>File System to import the jar files into your plug-in project, say in the <project>/lib directory.
- Use "Add..." to add the jars to the classpath section of the PDE Editor>Runtime tab.
- Use "New..." to add "." library back (with no quotes, of course). Some versions of eclipse automatically do this for you.
- Make sure your binary build exports the new jar files on the PDE Editor>Build tab.
- Save
- On the project, use the popup menu>PDE Tools>Update Classpath to correctly add the jars to the eclipse project classpath.
- Export any packages that you need to using the PDE Editor>Runtime tab
- Save
Check out https://bugs.eclipse.org/bugs/show_bug.cgi?id=108781
It talks about how adding a 3rd party jar removes the default "." classpath, and the need to add it back.
Also, eclipse can handle jars within jars. It expands them into a temporary location during runtime.