title: How to communicate with arduino and java in serial port?
body: <p>I was trying to send a message to Arduino (to test if the Arduino received any message the motor will turn on), the following code works if I run on Terminal</p>
  
  <pre><code>echo 1 &gt; /dev/ttyACM0
  </code></pre>
  
  <p>But I tried this in Java</p>
  
  <pre><code>Runtime.getRuntime().exec("echo 1 &gt; /dev/ttyACM0");
  </code></pre>
  
  <p>Anyone knows how to execute in Arduino Serial port?</p>