Posted by: Brian de Alwis | March 10, 2011

On the perils of creating plugins from jars

Eclipse JDT/PDE has a handy feature where you can make a plugin/bundle from an existing JAR. (File -> New -> PDE -> Create plugin from Jar). This might seem to be a brilliant feature, but it has a downside in that Eclipse JDT doesn’t check dependencies of the resulting class files.

This bit me recently when making a bundle from the JUNG libraries. Fortunately Peter Krien’s bnd does a great job (instructions), and there’s now some nice-looking tooling too.

BundleClassLoader[edu.uci.lcs.jung.algorithms_2.0.0].loadClass(edu.uci.ics.jung.graph.Hypergraph) failed.
java.lang.ClassNotFoundException: edu.uci.ics.jung.graph.Hypergraph



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s