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 |
This is fixed in ImageJ 1.37e, available at
<http://rsb.info.nih.gov/ij/notes.html>. ImageJ no longer displays a "Plugins folder not found" dialog if the plugins folder is missing and the IJ.runUserPlugIn() method no longer checks for the presence of the plugins folder. -wayne On May 4, 2006, at 11:01 AM, Curtis Rueden wrote: > 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 > |
In reply to this post by ctrueden
Curtis-
I'm following up a very old question you posted, with a response from Wayne.
How exactly to you configure you jpnl file, and where exactly are you putting the plugin jars? Are they bundled with ij.jar into a larger jar? Am I thinking off the right track?
If you could share with me/us as much detail on getting remote plugin files to run on a naive client computer through JWS, would be very appreciative!
Bill
|
Hi Bill,
Sorry for the delay in my reply. How exactly to you configure you jpnl file, and where exactly are you > putting the plugin jars? Are they bundled with ij.jar into a larger jar? > Am I thinking off the right track? > There is an example using Java Web Start on the ImageJ web site at: http://rsbweb.nih.gov/ij/applets.html Unfortunately, it does not include any plugins. If you could share with me/us as much detail on getting remote plugin files > to run on a naive client computer through JWS, would be very appreciative! > JWS downloads the code to your local computer and executes it from there, so it isn't that different from a local installation. The problem is that as you suggest, the plugins would need to be bundled into another JAR served through Web Start, which ImageJ would need to know should be checked for plugins, and I do not know how to configure ImageJ that way. Fiji might, but I do not know. Anybody else on the list have more experience with JWS and plugins? -Curtis On Fri, Oct 2, 2009 at 4:21 PM, Bill Mohler <[hidden email]> wrote: > Curtis- > > I'm following up a very old question you posted, with a response from > Wayne. > > How exactly to you configure you jpnl file, and where exactly are you > putting the plugin jars? Are they bundled with ij.jar into a larger jar? > Am I thinking off the right track? > > If you could share with me/us as much detail on getting remote plugin files > to run on a naive client computer through JWS, would be very appreciative! > > Bill > |
Free forum by Nabble | Edit this page |