how do you load the plugins into the application Permanently deleted user Created February 21, 2003 13:12 how do you load the jar-files(plugins) in the application without including in the sourcepath???
Just place the plugin jar in the plugins directory of IntelliJ. If IntelliJ is running, you will have to restart IntelliJ for it to see the new plugin. Is this what you wanted to know?
Tobin
no, i want to know how you can do this in java-code
Michael Seele wrote:
I suppose they're doing something approximately like this (from memory
-- I might not get every detail right):
URL path = new URL("file://ideaDirectory/plugins");
URL[] paths = new URL[] ;
ClassLoader cl = new URLClassLoader(paths);
Class c = cl.findClass("com.foo.MyPlugin");
Plugin pl = (Plugin) c.newInstance();
pl.whatever();
thanks. that works!!!