Classloader issues

My plugin requires some other jars (webwork-2.0.jar, for instance). Right now I'm just including them in C:\IntelliJ-IDEA-4.0.3\lib. Is there a better option, such as using the libs in the project? I know the SQL plugin allows you to specify the JDBC jar -- ideally I'd like to do that. Any tips?

3 comments
Comment actions Permalink

I believe the source is included with the SQL plugin. Learning by example is
the easiest way for me anyway.

"Pat Lightbody" <plightbo@hotmail.com> wrote in message
news:17029133.1084381261905.JavaMail.itn@is.intellij.net...

My plugin requires some other jars (webwork-2.0.jar, for instance). Right

now I'm just including them in C:\IntelliJ-IDEA-4.0.3\lib. Is there a better
option, such as using the libs in the project? I know the SQL plugin allows
you to specify the JDBC jar -- ideally I'd like to do that. Any tips?
>


0
Comment actions Permalink

I believe this is covered in the standard plugin documentation located in the IDEA_DIR/docs
To cut the story short you can create a directory structure like IDEA_DIR/plugins/]]>/lib. Under lib you can place your plugin jar and every other dependent jars you need.

When you are ready to release your plugin make sure you update your plugin.xml with version information (several of us have created ant build to automate all that. Just email me personally if you want my version). zip everything up from myplugin dir and upload it from the Plugin Manager repository at http://plugins.intellij.net

Hope this help

Jacques

0
Comment actions Permalink

Obviously the assumption I made with you writing a plugin for ww is that you don't need to have runtime loading of thirdparty jars like the sql plugin. If you have static dependencies just put them under lib.

Another tip: a separate classloader is used to load the components you have listed in your plugin.xml. This way you can avoid versioning problem.

Jacques

0

Please sign in to leave a comment.