Login  Register

plugins in Java Web Start

Posted by ctrueden on May 04, 2006; 4:01pm
URL: http://imagej.273.s1.nabble.com/plugins-in-Java-Web-Start-tp3690887.html

Hi,

I'm trying to package ImageJ for use with Java Web Start. I have
included some user plugins in IJ_Props.txt, and additional JAR files
containing the corresponding code.

If the plugins folder exists on disk, this scheme works. But if there is
no plugins folder, the user plugins fail to launch. This behavior is due
to the following code in IJ's runUserPlugIn method:

        if (pluginsDir==null)
            return null;

Is there a reason for this check? Even if the plugins folder is null the
plugin could still be found by the system classloader (and in my case it
would be).

My question is: is there a way to specify "no plugins folder" such that
the "Plugins folder not found" dialog does not appear, and bundled user
plugins can still function? This could perhaps work by setting
plugins.dir to "", or some other special value.

I realize I could have a launcher class that creates the plugins folder
if necessary, but that entails write access to the client storage
device, which seems like an unnecessary requirement. Another solution
would be to hack the ImageJ source, but I'd rather be able to drop in a
new ij.jar when ImageJ is updated and have things automatically work.

Thanks,
-Curtis