0

I have one Eclipse RCP plugin (A) that include another one with jar libraries (B) and it works but i want to add there another jar library and i cant refresh my Eclipse RCP Plugin (A) to make packages from new jar visible.

I added new jar in MANIFEST.MF and Properties->Java build Path->Libraries as i had added a lot of others jar libraries.

Should i refresh project somehow to make it visible?

I use Eclipse for RCP and RAP Developers

Version: Mars.1 Release (4.5.1) Build id: 20150924-1200

(btw is it the only way to include external jar libraries? is it good way to do it or does anyone has better solution?)

EDIT: The problem is resolved. I had to Launch (and build?) my Eclipse RCP Plugin with jar libraries (i thought that it doesnt have to be compiled but it is a config that just exist to describe libraries that are included).

Bartek Szczypien
  • 333
  • 4
  • 17
  • Possible duplicate of [How can I call a method in jar from another eclipse plugin project?](http://stackoverflow.com/questions/22163692/how-can-i-call-a-method-in-jar-from-another-eclipse-plugin-project) – Basilevs Jan 04 '16 at 08:04

1 Answers1

1

In your plugin containing the jars you must list all the packages that other plugins can see in the 'Exported Packages' section on the 'Runtime' tab of the MANIFEST.MF editor. You must also list the jars in the 'Classpath' section.

The jars should be in the plugin and must also be listed in the 'build.properties' so that they are included in the RCP build. You should not have to set anything in the Java Build Path.

Here is an example of how the 'Runtime' tab should look: Runtime tab

Here I have 4 jars in a 'lib' directory with lots of exported packages.

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • Thank you Greg for your fast answer but i have added my new jar to all those configs. But still cant use classes from new jar in my second plugin. I guess that i should somehow refresh my project, shouldent i? (RMB->Refresh doesnt resolve the problem) – Bartek Szczypien Jan 04 '16 at 12:03
  • There is no refresh for this, it should just work. You could try removing the jar plugin from the other plugin's dependencies and adding it again. Be sure you have added the packages you want to use to the exported packages list. – greg-449 Jan 04 '16 at 12:28
  • i just pressed "Launch" button in my Manifest.MF file (plugin with libraries) and since then the new jar is visible. – Bartek Szczypien Jan 04 '16 at 12:36