title: How to redirect output from java to matlab
body: <p>I have a compiled .JAR file which gets two datasets as input and results in some scores (real numbers). The outputs are printed in console (cmd prompt env.). However I want to call the function multiple times whitin my matlab code. I have no access to the source code of JAR file. Is there any efficient way (probably other than using files) to get the results of jar file back to matlab. </p>
  
  <p>Sample JAR outputs:</p>
  
  <hr>
  
  <p>a: 82.212 %</p>
  
  <p>b: 0 %</p>
  
  <p>c: 0.003 %</p>
  
  <hr>
  
  <p>d: 13.471 %</p>
  
  <p>e: 4.809 %</p>
  
  <hr>
  
  <p>I want these 5 numbers. They are always printed in the same format.</p>
  
  <p>Is there any way I can redirect these results for example to a TCP/IP port that matlab can read the results?</p>
  
  <p>Thanks</p>