Login  Register

Run native executable in a plugin, Apache commons exec or processbuilder???

Posted by Daniel White on Oct 15, 2014; 7:01pm
URL: http://imagej.273.s1.nabble.com/Run-native-executable-in-a-plugin-Apache-commons-exec-or-processbuilder-tp5010068.html

hi folks,
Did anyone ever make a plugin or script or macro that runs a native
executable as a sub process  , perhaps using Apache commons exec or the
native Java processbuilder?

Processbuilder looks quite easy, but Apache commons exec has nice stuff
like asynchronous execution....

Any code/tips/advice?

For example, if I want to write a ImageJ plugin with a gui for setting
command line parameters for a user defined linux c++ executable, and have
the plugin run the executable on a image file and deal with the standard
error and output, by eg . dumping them in a text file.

Just to make it easy to run a linux executable on an image.... From
inside imageJ....
An open image knows where it's file was opened from right? So the plugin
could use that file name as a parameter for the Linux executable, catch the
exit signal from the executable, then open the result image.

Did anyone solve that already?


Best

Dan

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html