summaryrefslogtreecommitdiff
path: root/INSTALL
blob: b9c21b960f3167c1697da0a5edf4fb54d3e20020 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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.

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