This is a second part to my question here.
I now have a process but I want to know how to get the output from the process?
String filename = matlab.
public static void main (not Object as return type)exec(), get the output with process.getOutputStream()OutputStream (check this)Now, this is a weird way to do it, but as I don't know exactly what you are trying to achieve, it sounds reasonable.