Difference between revisions of "Installing the Java D-Bus bindings"
(Moved this out from D-Bus_examples) |
(Added link to compilation guide) |
||
Line 1: | Line 1: | ||
This is to help those who want to compile a [[D-Bus examples#Java|Java program]] using Apertium's [[D-Bus_service_for_Apertium|D-Bus services]]. |
This is to help those who want to compile a [[D-Bus examples#Java|Java program]] using Apertium's [[D-Bus_service_for_Apertium|D-Bus services]]. |
||
==Installing the Java D-Bus bindings== |
|||
First you will need to [http://dbus.freedesktop.org/releases/dbus-java/dbus-java-2.3.2.tar.gz download the D-Bus bindings for Java]; the latest version can be found on the [http://www.freedesktop.org/wiki/Software/DBusBindings D-Bus project site]. The bindings use [http://www.matthew.ath.cx/projects/java/libmatthew-java-0.5.tar.gz libmatthew] by the same author; the latest version can be [http://www.matthew.ath.cx/projects/java/ downloaded from his site]. |
First you will need to [http://dbus.freedesktop.org/releases/dbus-java/dbus-java-2.3.2.tar.gz download the D-Bus bindings for Java]; the latest version can be found on the [http://www.freedesktop.org/wiki/Software/DBusBindings D-Bus project site]. The bindings use [http://www.matthew.ath.cx/projects/java/libmatthew-java-0.5.tar.gz libmatthew] by the same author; the latest version can be [http://www.matthew.ath.cx/projects/java/ downloaded from his site]. |
||
Line 24: | Line 22: | ||
You should get output that looks something like this: |
You should get output that looks something like this: |
||
<pre>[[en-af, af-en]]</pre> |
<pre>[[en-af, af-en]]</pre> |
||
''Now that the installation works, you might want to look at our guide to [[Compiling a Java D-Bus program|compiling Java D-Bus programs]], using Apertium as an example.'' |
Latest revision as of 12:58, 19 December 2007
This is to help those who want to compile a Java program using Apertium's D-Bus services.
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]]
Now that the installation works, you might want to look at our guide to compiling Java D-Bus programs, using Apertium as an example.