Re: Using System.out and System.err from ImageJ plugins (Java)
Posted by
dscho on
Feb 27, 2013; 8:45pm
URL: http://imagej.273.s1.nabble.com/Using-System-out-and-System-err-from-ImageJ-plugins-Java-tp5001799p5001903.html
Dear Wayne,
On Wed, 27 Feb 2013, Johannes Schindelin wrote:
> On Wed, 27 Feb 2013, Rasband, Wayne (NIH/NIMH) [E] wrote:
>
> > You can redirect System.out and System.err messages to the Log window
> > by enabling debug mode in Edit>Options>Misc.
>
> [...] this interferes with Fiji's stdout/stderr handling. I am fixing it
> as we speak.
I just tested this Javascript after downloading and starting
http://imagej.net/ij.jar: importClass(Packages.java.lang.System);
System.err.println("Hello");
It did not interfere with Fiji's redirection -- unexpectedly.
I tried to find out by studying the source code, but the newest commit did
not show how the redirection works:
http://fiji.sc/cgi-bin/gitweb.cgi?p=imagej.git;a=commitdiff;h=83f7efc605f666626f5f78d10bbe5c7d52b75e61Indeed, building from the current 'master' of your repository does not
redirect stdout/stderr when the debug mode is enabled.
Ciao,
Johannes
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html