Using 3rd Party Libraries on Plugins (which cannot packed in to the distribution jar)

Hi ,
I have done a plugin for integrate Systinet's WASP to idea 4.5. But I have few problems in the distribution of the plugin.
The plugin needed some of the wasp libraries, which I cannot packed in to the distribution jar, But these are need in the startup of the plugin.

At the moment im doing it by editing the idea.lax file and appending the list libs to the lax.class.path, Is there any other way I can load these plugins in to the runtime (without the user involvement)

Regards

Ruwan

3 comments
Comment actions Permalink

I simply included the library jars with the plugin jar in plugins//lib and they work fine. That is, if there isn't any classloader sorcery going on. The context classloader, from Thread.getContextClassLoader, isn't the same one that loaded the plugin jars and won't be able to find any resources in the plugin jars. You can set the context classloader to the plugin class's classloader without any problems. Some frameworks, like Spring, use this classloader to load config files. Steve "Sanjeewa Ruwanpathirana" ]]> wrote in message
news:22401981.1106905673190.JavaMail.itn@is.intellij.net...

Hi ,
I have done a plugin for integrate Systinet's WASP to idea 4.5. But I have

few problems in the distribution of the plugin.

The plugin needed some of the wasp libraries, which I cannot packed in to

the distribution jar, But these are need in the startup of the plugin.
>

At the moment im doing it by editing the idea.lax file and appending the

list libs to the lax.class.path, Is there any other way I can load these
plugins in to the runtime (without the user involvement)
>

Regards

>

Ruwan



0
Comment actions Permalink

I did try the copying jars in to the lib folder. It doesn't work. Class Cast exception thrown inside the wasp libraries (3rd party libs I used). Seems Idea loads some other library beforehand. Since the thrown error doesn't indicate which class is mismatched, I'm in a deep mess on solving this. Fortunately including jars files in lax class path works fine.

Ruwan

0
Comment actions Permalink

Sanjeewa Ruwanpathirana <no_mail@jetbrains.com> wrote:

I did try the copying jars in to the lib folder. It doesn't work. Class
Cast exception thrown inside the wasp libraries (3rd party libs I used).
Seems Idea loads some other library beforehand. Since the thrown error


I know for my plugin, which makes use of JDOM and Xpath I had to build my
own subset of the JDOM jar which only included the bits I used, that wernt
shipped with IDEA. Really ugly :(

0

Please sign in to leave a comment.