<?php
$output = shell_exec('java -jar come.jar hola');

$output = str_replace('WARNING:  RXTX Version mismatch', '', $output);
$output = str_replace('Jar version = RXTX-2.2pre1', '', $output);
$output = str_replace('native lib Version = RXTX-2.2pre2', '', $output);
$output = str_replace('
', '', $output);
$output = str_replace('           ', '', $output);
$output = str_replace('java.lang.NullPointerException', '', $output);
$output = trim($output, "");
echo $output;
