PortInUse Exception

  • mylo78

    mylo78 - 2007-09-12

    Dear Developer,

    I use the serial ports in linux as they are /dev/ttySXX and now find myself using a macbook.

    When firing up my java application, I get a PortInUse Exception.  From what I understand this means I cannot put a lock on the port.  It stops me from loading the serial port classes.

    I am using rxtx packages on the java side of things: http://rxtx.org

    I thought it was a permissions issue, so I've made the port /dev/tty.PL2303-0000101D world readable/writable/executable.  No progress though :(

    Any tips?


    • Andre John Mas

      Andre John Mas - 2007-11-08

      You should check the RXTX mailing list. You need the 2.1-8 source from RXTX CVS, since 2.1-7 uses lock files which aren't used by MacOS X.

    • mylo78

      mylo78 - 2008-12-09

      After one year, I re-installed osx and had the same problem!  I googled the message and thought GREAT! someone else has had the same problem ... then I reached my message from last year.

      So, to overcome it, I just had to:

      mkdir /var/spool/uucp
      chmod 755 /var/spool/uucp
      mkdir /var/lock
      chmod 777 /var/lock

      It works.


Log in to post a comment.