Arduino + Java = error “Serial Port Already in Use”

If you try to run the Arduino IDE and the RXTX Java library on MacOS Lion and you are hitting a “Serial Port Already in Use” error,  try:

$ sudo mkdir /var/lock
$ sudo chmod 777 /var/lock

That should hopefully allow you to run them both (though only one at a time!)

If you want  interface your Arduino with the Java, see the Arduino documentation.