Beaglebone RXTXlibrary in Java and Serial communication with Arduino

I am trying to communicate Beaglebone with my Arduino. I am writing code in Java. First develop and compile the code in my computer and then tranfer files to BeagleBone. However, I am having trouble in sending command over serial port.

Following this tutorial in order to enable UART pins and set the UART1 pin for mode0. I wrote the code in Java and transfered compiled class file and RXTXcomm.jar library to my Bone. Also installed librxtx-java using apt-get installer on my Bone. In order to run java code I wrote:

java -classpath ./:./lib/RXTXcomm.jar -Djava.library.path=/usr/lib/jni Serial

but I got this error:

WARNING: RXTX Version mismatch Jar version = RXTX-2.2-20081207 Cloudhopper Build native lib Version = RXTX-2.2pre2 port /dev/ttyO1 not found.

Interesting thing is that when I write

echo hello > /dev/ttyO1

Beaglebone sends “hello” to my arduino.

Am I missing anything between the steps?