Posted by
David Webster on
Jan 03, 2010; 5:45pm
URL: http://imagej.273.s1.nabble.com/imagej-batch-tp3689863p3689865.html
Wayne/Al,
I did this "imagej -macro Random_Ovals" but get the error message "macro or
script not found". I was looking for something that would run my Java Plugin
(i.e a class file) from the command line. If I can do this, it not
immediately obvious how to from the documentation.
Specifically, I can easily compile Plugins using the JCreator IDEI can even
run them to a limited extent using my own runner program with a main(). But
I would like to do it with ImageJ.java so that I can have full
functionality.
David
P.S. I sent this to the group as it seems to be of general interest.
On Sat, Jan 2, 2010 at 7:34 PM, Wayne Rasband <
[hidden email]> wrote:
> > I tried running "imagej -batch Random_Ovals" and "imagej
> > -batch Random_Ovals.class" from the command line in a
> > Windows command prompt window, but nothig happens in the
> > first case, and in the second I get a macro error. The
> > documentation in Plugins/Programming Examples/Command Line
> > Example says this should work with a Plugin. What am I doing
> > wrong?
> >
> > David Webster
>
> Running "imagej -batch Random_Ovals" from the command line does not appear
> to do anything because -batch runs a macro in batch mode, and images are not
> displayed in batch mode. Instead, use "imagej -macro Random_Ovals". "imagej
> -batch Random_Ovals.class" does not work because -batch only runs macros.
> Instead, use "imagej -run "Random Ovals". All of the ImageJ command line
> options are described at
>
>
http://rsbweb.nih.gov/ij/docs/install/linux.html#options>
> -wayne