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.

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

  1. Worked great, however I am very curious to know why.
    Do you know any of the technical details?

    From what I can discern: permission were changed. (?)

  2. Thanks a lot man. Search for this problem until I found your blog. You’ve address my port already in use problem. I hope, they update the arduino code base to fix this issue. My environment: Mac OS (Mountain Lion / 10.8.2), Latest Apple Java Update, Arduino 1.0.5)

    You’re half man half amazing!!!

  3. Guys I had the same problem and same error . Follow these steps and you could solve the problem:
    1. First connect the arduino to a different serial port.
    2.Go to device manager and click on the arduino com port .
    3.Then click update driver software and click the last option and follow the steps.
    You problem will be solved
    This worked for me.

Comments are closed.