ParallelPort Installation Instructions (Linux)

  1. Download parport-linux.zip to your computer.

  2. Unzip the file parport-linux.zip. This will produce a top level directory parport containing the class files, libparport.so, C source files, and example programs. This directory (parport) should go in your "Java classes" directory. In other words, it should go in a directory contained in your CLASSPATH.

    The examples in this document assume that you have unzipped the parport-linux.zip file in your /usr/local/java/classes directory. If you have unzipped parport-linux.zip in another location, modify the example commands appropriately.

  3. Copy libparport.so to any directory in your LD_LIBRARY_PATH. Or, you can leave it where it's at and modify your LD_LIBRARY_PATH environment variable:
    $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/java/classes/parport
  4. Add parport to your CLASSPATH:
    • If you don't have a CLASSPATH defined:
      $ export CLASSPATH=/usr/local/java/classes
    • If you already have a CLASSPATH defined, then your "Java classes" directory is most probably already there, and the compiler will find parport easily. In case it's not, you can do this:
      $ export CLASSPATH=%CLASSPATH%:/usr/local/java/classes
  5. You will need root privileges to access the port.

API Documentation
To view the API documentation for ParallelPort, point your browser to ParallelPort.html.