[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Editor plugin: instantiation external class

Built path and plugin loading are unrelated. You need to include the jar in
your plugin folder (or it needs to be in another plugin) and add a runtime
library element to your plugin.xml.

Unless it's xerces; then you need to not put it in your plugin folder and in
your plugin.xml import the org.apache.xerces plugin. You will then need to
call the thread's setContextClassLoader(this.getClass().getClassLoader())
before trying to call parser stuff.

Oh, yes, and bow three times in the direction of an OTI office, any one will
do, while reciting, "It makes perfect sense. It makes perfect sense. It
makes perfect sense." ;-}

Bob

"Ebraert Peter" <pebraert@xxxxxxxxx> wrote in message
news:b7ucqf$3rf$1@xxxxxxxxxxxxxxxx
> I am writing an editor plugin for eclipse.
> In that editor I try to instantiate a SAXBuilder (for parsing an XML
file).
> I include the JDOM library that comes with the SAXBuilder in the Build
> Path of the plugin.
>
> No compile errors errors occur.
>
> When running the workbench WITH the new plugin, and starting the plugin, I
> get the java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder.
>
> This also occurs when instantiating classes from other imported libraries.
>
> Can somebody tell me what to do?
>
> Thanks,
>
> Peter
>