D-Bus Java bindings installation guide --------------------------------------- Prerequisites ------------- To compile and install these bindings you will need: A Java 1.5-compliant VM and Compiler (at time of writing only the Sun VM and Compiler is known to work). A C compiler and toolchain. D-Bus 1.0 libraries To build and install the documentation you will also need: A LaTeX environment tex4ht docbook Compiling the Bindings ---------------------- Simply invoke `make' in the top level directory to compile the bindings. Depending on your JDK installation you may need to export JAVA_HOME appropriately. The bindings will be installed into /usr/local by invoking `make install'. If you wish to install them anywhere else then run make with the PREFIX variable set to another location. More fine grained control of the installation directories can be achieved using the BINDIR etc variables. For more detail read the Makefile. DESTDIR can be used for packaging to install with the correct hierarchy into a temporary folder. NOTE: if you set PREFIX in `make install' you should also set it when invoking just `make'. PREFIX is to create the binary wrappers with the correct paths to the installed library. Documentation for the bindings can be built with `make doc' and installed with `make install-doc install-man', with the same provisos for installation paths. Using the Bindings ------------------ The documentation which is by default installed into /usr/local/share/doc/libdbus-java/ gives detailed instructions on how to call D-Bus programs from Java using these bindings and a full API reference. To run a Java program using D-Bus you need to have the libdbus-java jar file in your classpath and both the libdbus and libdbus-java shared object files in your library path. With the default install paths you may have to do something like: java -cp /usr/local/share/java/dbus.jar -Djava.library.path=/usr/lib:/usr/local/lib/jni You may also have to export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib/jni