Re: Running Java based GUIs as Plug In
Posted by
dscho on
Oct 14, 2013; 2:06pm
URL: http://imagej.273.s1.nabble.com/Running-Java-based-GUIs-as-Plug-In-tp5005165p5005178.html
Hi,
On Mon, 14 Oct 2013, John Hayes wrote:
> ImageJ plugins don’t use the standard Java ‘main’ function as an entry point.
To clarify: main() methods are meant to be main entry points into
applications, not into classes. You should expect main() methods to call
System.exit() upon exit, which would quit all of ImageJ without giving the
user a chance to save their data.
That is the reason why plugins have a run() method which is expected
*not* to quit the application.
ImageJ plugins also have the quirk that you can perform all the
computation in a constructor (that cannot take parameters). This is not
good object-oriented design, of course, but it is convenient for
quick-n-dirty coding.
Ciao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html