Adding jars to a Eclipse PlugIn

I think I found a proper solution; the trick is that you have to implement all the files via Eclipse. I just copy here the solution which was posted to news.eclipse.platform:

Include the jars in a plugin:

  1. Use Import > File System to import the jar files into your plugin project, say in the <project>/lib directory.
  2. Use Add... button to add the jars to the classpath section of the plugin.xml > Runtime tab.
  3. Use New... button to add “.” library back (with no quotes, of course).
  4. Make sure your binary build exports the new jar files on the plugin.xml > Build tab.
  5. Save
  6. On the project, use context menu > PDE Tools > Update Classpath to correctly add the jars to the eclipse project classpath.

Leave a Comment