Apertium:Sandbox

From Apertium
Revision as of 13:05, 19 December 2007 by Soroush (talk | contribs) (including a non template page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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();
        }
}