Interfacing Arduino and Java - Please Help!

Greetings all,

I have been trying for some time now to
create a stable link between a computer running
Java and an Arduino returning sensor data and
driving a series of motors.

There are roughly 10 analog IR sensors and 10
motors being driven from the board. They are
working well.

When I have used much of the serial java code
found on the web, I am able to receive strings
byte by byte, but only until the system falls out
of sync, then I just get garble. I am also not
convinced that these strings could be sent fast
enough to notify motor changes based on sensor
data sent from the arduino to the PC.

Does anyone know where I could find comparable
example code? Any suggestions?

Thank you much

When I have used much of the serial java code
found on the web, I am able to receive strings
byte by byte, but only until the system falls out
of sync, then I just get garble.

Apparently, you are not implementing a method of keeping the data in sync.

What does your sending code look like?
What does your receiving code look like?

What is the java application contributing? The Arduino should be able to handle the mapping of the sensor data to motor control data.