title: Supressing console (disp) output for compiled MATLAB > Java program (using MATLAB Compiler)
body: <p><strong>Edit 2</strong> After recieving a response from Mathworks support I've answered the question myself. In brief, there is an options class <code>MWComponentOptions</code> that is passed to the exported class when instantiated. This can, among other things, specify unique print streams for error output and regular output (i.e. from <code>disp()</code>-liked functions). Thanks for all the responses none the less :)</p>
  
  <p>====================================================================</p>
  
  <p>Just a quick question - is there any way to prevent MATLAB code from outputting to the Java console with <code>disp</code> (and similar) functions once compiled? What is useful debugging information in MATLAB quickly becomes annoying extra text in the Java logs.</p>
  
  <p>The compilation tool I'm using is MATLAB Compiler (which I think is not the same as MATLAB Builder JA, but I might be wrong). I can't find any good documentation on the <code>mcc</code> command so am not sure if there are any options for this.</p>
  
  <p>Of course if this is impossible and a direct consequence of the compiler converting all MATLAB code to its Java equivalent then that's completely understandable.</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>Edit</strong> This will also be useful to handle error reporting on the Java side alone - currently all MATLAB errors are sent to the console regardless of whether they are caught or not.</p>