Difference between revisions of "Apertium:Sandbox"

From Apertium
Jump to navigation Jump to search
(New page: {{Sandbox}} <!-- Edit below this line -->)
 
(including a non template page)
 
Line 1: Line 1:
{{Sandbox}}
{{Sandbox}}
<!-- Edit below this line -->
<!-- Edit below this line -->

{{User:Soroush/Tests}}

Latest revision as of 13:05, 19 December 2007

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();
        }
}