Send data to arduino from PC in java over Serial (RXTXlib)

Maybe you have to wait for a while after open connection. Insert in the Java application a sleep and then send your data. If you aren't interested in programming connection but you want just to control arduino from java you can try my library.

www.ardulink.org

I suggest you to see this tutorial.

After Link class is retrieved you can send to Arduino all the data you need.