Installing the Java D-Bus bindings
Revision as of 12:43, 19 December 2007 by Wynand.winterbach (talk | contribs) (Moved this out from D-Bus_examples)
This is to help those who want to compile a Java program using Apertium's D-Bus services.
Installing the Java D-Bus bindings
First you will need to download the D-Bus bindings for Java; the latest version can be found on the D-Bus project site. The bindings use libmatthew by the same author; the latest version can be downloaded from his site.
- Compile and install libmatthew.
- Compile and install the Java D-Bus bindings (ignore errors about invalid JAR paths - if it compiles and installs, everything will work.)
The Java binding build process should install the following binaries on your machine:
- CreateInterface
- DBusCall
- DBusDaemon
- DBusViewer
- ListDBus
You can make sure that everything works by executing:
DBusCall org.apertium.info / org.apertium.Info modes
If you get a message such as
ParseException: Bus address is blank
it means that the environment variable $DBUS_SESSION_BUS_ADDRESS isn't set. You can get around it by using dbus-launch --exit-with-session
to execute the program:
dbus-launch --exit-with-session DBusCall org.apertium.info / org.apertium.Info modes.
You should get output that looks something like this:
[[en-af, af-en]]