I've read that this issue is known, and comes up in different forms on this forum.
I'm sending data from my Arduino Uno over the serial monitor so it can be read and displayed by my Processing program. They are both using the same serial port (Com4 in my case), the arduino is sending, the processing is receiving. This worked for me once before, when I was doing this tutorial:
It gives me an error now (albeit a different program is running).
I can't start the processing program while Arduino is still running. If I upload the arduino sketch, open the serial monitor to confirm there is data, and then shutdown the arduino program (and serial monitor along with it), then start my processing sketch, I don't have a problem. This is because the arduino is sending data (3axis accel) over the serial with the arduino program needing to run, the board is doing the job.
When my Processing gui starts I see the solid Tx led on my Arduino uno board start blinking, transmitting and I can see the data on my screen.
I found a forum post that I thought would be promising which said it might be a java extension that's causing the headache. http//forum.arduino.cc/index.php/topic,26118.0.html
I looked for RXTX library or rxtx or comm.jar like the post said but didn't find anything. I am using windows 7, processing 2.0.1 (32bit, need serial) and arduino 1.0.5
My program can't execute the line that reads: myPort = new Serial(this, "COM4", 9600); Port exception, already in use, go suck a lemon, go fly a kite, something to that effect.