Login  Register

making system call from a plugin

Posted by jvander on Dec 04, 2014; 4:24pm
URL: http://imagej.273.s1.nabble.com/making-system-call-from-a-plugin-tp5010767.html

Short version of question:   Can I call a system level command from a plug in.

Long version:  I have compiled executables from my own C code that run from the command line in a Mac OS X terminal or Xterminal window.  For example an executable might be called myexecutable.  I can run that program by opening a terminal window and typing

./myexecutable

at the prompt, provided I have first navigated to the correct directory.  Not sure why the period and forward slash are needed in front of the executable name, but that's what works in OS X.

I would like to have an ImageJ plugin open up a terminal window, go to the correct directory and execute  the program.

Is this feasible?  If so, any tips or resources would be appreciated.  I am not expert in Java by any means so pointing to examples would be greatly appreciated.

thanks

Joe vanderGracht

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