4
|
1 package dbustest;
|
|
2
|
|
3 import java.io.IOException;
|
|
4
|
|
5 import org.freedesktop.dbus.DirectConnection;
|
|
6
|
|
7 import dbus_d_javahelper.ConsoleProcess;
|
|
8 import dbus_d_javahelper.DBusDLoader;
|
|
9
|
|
10 public class DBusTester {
|
|
11
|
|
12 static DirectConnection dc;
|
|
13 static ConsoleProcess process;
|
|
14
|
|
15 /**
|
|
16 * @param args
|
|
17 */
|
|
18 public static void main(String[] args) {
|
|
19 // TODO Auto-generated method stub
|
|
20
|
|
21 final String address = DirectConnection.createDynamicTCPSession();
|
|
22 DBusDLoader busDLoader = new DBusDLoader( "../dsrc/DBusTesting" );
|
|
23 try{
|
|
24 System.err.println("Java App: start D");
|
|
25 DirectConnection dc = busDLoader.startup();
|
|
26
|
|
27 DataFileSystem rem = (DataFileSystem) dc.getRemoteObject(
|
|
28 "/DHelper/MyDataFileSystem/0", DBusTesting.class);
|
|
29
|
|
30 System.err.println("Java App: startup complete");
|
|
31 }
|
|
32 finally{
|
|
33 busDLoader.disconnect();
|
|
34 }
|
|
35 }
|
|
36
|
|
37 }
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44 |