views:

291

answers:

1

Hi,

I need to add a variable to a jar in my eclipse plugin project. I get No class definition found exception. My thoughts is that i need to add it somehow in the manifest file?

Thank you, Ido

A: 

The best way to do this (if it will work for you) is to include the jar in the bundle (plugin) from which you want to use it. This allows you to use the functionality in the jar, but not expose it to the rest of your application except through whatever API you provide for your plugin. You can add the jar to your plugin's classpath, which allows you to access all of its classes

It's best if you completely hide the external jar by not exposing its internal packages from the manifest file, and by not exposing any of its classes to the rest of the application, though if you need to do so, it is possible. I have done this both ways and prefer to hide the external jars. The Eclipse RCP book (McAffer and Lemieux) covers this process in some detail.

Steve Robenalt
The jar is 200 mb, and each developer that uses my plugin already have it on his machine, so I want them to use the jars already in their machine, scince they are also responsible for updating this jar.
Ido