How do I find out where a .class is coming from? [message #290777] |
Wed, 31 August 2005 19:45 |
Eclipse User |
|
|
|
Originally posted by: esnible.acm.org
I've written an Eclipse plug-in. It uses a library .jar I'll call "foo",
and foo.jar uses the class javax.xml.namespace.QName. foo.jar expects a
recent version of QName because it expects a three-string constructor.
I've made foo.jar a runtime dependency and it works fine until I call a
method that references QName.class. Because even though I've put a .jar
with a recent QName.class into my runtime dependencies, Eclipse chooses to
use another QName.class in the classpath.
Specifically,
ClassLoader cl = QName.class.getClassLoader();
System.out.println(cl.getResource("javax/xml/namespace/QName.class "));
returns "bundleresource://474/javax/xml/namespace/QName.class".
Bundle 474 is
IBM/Rational/SDP/6.0/rwd/eclipse/plugins/com.ibm.etools.wsdl _6.0.0/
(because I added a dependency to IBM's RAD to my project).
In general, what is the strategy for controlling this? Should I put
foo.jar and a recent QName.class in their own plug-in so foo can't see my
plug-in's dependencies? Is there a better way?
|
|
|
Powered by
FUDForum. Page generated in 0.04237 seconds