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

Open the port, resetting the Arduino. While it is rebooting, send it some data. Then, close the port, resetting the Arduino again. Then, expect the Arduino to do something with the serial data. Is it any wonder why it doesn't?