Hi,
On Sun, 15 Aug 2010, Bill Mohler wrote:
> Can I use system command lines to control the behavior of an instance of
> ImageJ that is already open and running? How?
You can use the "socket listener" which is turned off by default in plain
ImageJ, but turned on by default in Fiji.
When switched on, a second invocation via the command line will actually
send the arguments (including -macro and -eval) commands to the first
instance and then quit the second instance.
If you do not want to require the socket listener to be switched on, you
will basically have to rewrite it. It is easy if you use RMI (remote
method invocation). See
http://download.oracle.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html
for a tutorial (although you do not need to register anything with a
to-be-started RMI registry, you can just serialize the stub and write it
to disk, where the client can read it).
Ciao,
Dscho