Installation on Linux

From Rxtx

Revision as of 23:12, 5 December 2007 by Ajmas (Talk | contribs)
Jump to: navigation, search

The documentation below is a little dated and could do with some updating. Please could someone reformat and ensure their correctness:

Contents

Requirements

JDK 1.3+ -- how to get for Ubuntu, Red Hat, etc.

Installing from Source

Quick Install

The following packages are used to build rxtx:

autoconf-2.59 automake-1.9.5 libtool-1.5.18 gnu make-3.79.1 On some systems like FreeBSD this is called gmake jdk 1.3 or newer

With the packages installed, proceed to build and install rxtx.

		$ tar -xzvf rxtx-2.1.tar.gz
		$ cd rxtx-2.1
		$ ./configure  (follow the instructions)
		$ make install (gmake if your system uses that convention)
		Read "R.  How can I use Lock Files with rxtx?"

One catch that has showed up... you cannot have spaces in the path. for instance: /home/jarvi/test build/rxtx/... will cause problems.

                                  ----^

If that does not work or you do not want a script messing with the system, read on..


Add RXTXcomm.jar to your CLASSPATH.

jdk-1.1:

make sure /usr/local/java/lib/RXTXcomm.jar is in your CLASSPATH. If you want to use apps that require RXTXcomm.jar.

in bash:

$ export CLASSPATH=${CLASSPATH}:/usr/local/java/lib/RXTXcomm.jar:.

jdk-1.2 and newer:

No changes are needed.

Build and Install the jar.

configure configure supports build directories. configure requires javac in its path or JAVA_HOME set to grab some java system properties. make to build RXTXcomm.jar and the libraries make install to place the jar and libraries in the correct location

You may select the JDK you wish to build with using $JAVA_HOME For example: export JAVA_HOME=/usr/local/java Otherwise, configure grabs the JDK from your PATH.

Where did everything end up?

Lets assume the top java directory is /usr/local/java

jdk-1.2 the files go in

			/usr/local/java/jre/lib/ext/RXTXcomm.jar
			/usr/local/java/jre/lib/$(ARCH)/librxtxSerial.so.
			/usr/local/java/jre/lib/$(ARCH)/librxtxParallel.so.
			/usr/local/java/jre/lib/$(ARCH)/lib/...

		jdk-1.1.* the files go in 

			/usr/local/java/lib/RXTXcomm.jar
			/usr/lib/librxtxSerial.so.
			/usr/lib/librxtxParallel.so.
			/usr/lib/...

			The librxtxSerial.so librxtxParallel.so are placed in 
			/usr/lib so people don't have to change with their 
			LD_LIBRARY_PATH.

Installing Binaries

To do...

Personal tools