Apertium has moved from SourceForge to GitHub.
If you have any questions, please come and talk to us on #apertium on irc.freenode.net or contact the GitHub migration team.

Apertium:Sandbox

From Apertium
Jump to: navigation, search
Welcome to the Apertium Sandbox! This page allows you to carry out experiments. To edit, click here or edit this page above (or the views section for obscure browsers), make your changes and click the Save page button when finished. Content will not stay permanently; this page is automatically cleaned every hour.

Please do not place copyrighted, offensive, or libelous content in the sandbox(es). If you have any questions regarding Apertium, please see Apertium:Questions. Thanks!

This page is a virtual sandbox on Apertium Wiki. For uses of sandboxes, see the article sandbox.


import org.freedesktop.DBus;
import org.freedesktop.dbus.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;

import org.apertium.Info; // The interface we use to access org.apertium.info/

class TestDBus {

        public static void main(String[] args) throws org.freedesktop.dbus.exceptions.DBusException {
                DBusConnection bus = null;
                Info info = null;

                bus = DBusConnection.getConnection(DBusConnection.SESSION);
                info = bus.getRemoteObject("org.apertium.info", "/", Info.class);

                for (String s : info.modes()) {
                        System.out.println(s);
                }

                bus.disconnect();
        }
}
Personal tools