From 9b3cc41689348dfb8d46a4ed8a66541e9008b851 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Nov 2013 09:50:28 +0100 Subject: Test --- Dozentenmodul/src/rmi/RmiClientMethods.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dozentenmodul/src/rmi/RmiClientMethods.java (limited to 'Dozentenmodul/src/rmi/RmiClientMethods.java') diff --git a/Dozentenmodul/src/rmi/RmiClientMethods.java b/Dozentenmodul/src/rmi/RmiClientMethods.java new file mode 100644 index 00000000..58df1734 --- /dev/null +++ b/Dozentenmodul/src/rmi/RmiClientMethods.java @@ -0,0 +1,29 @@ +package rmi; +import java.rmi.*; +import server.*; + +public class RmiClientMethods { + + public ServerInterface getInterface() + { + String strName = "rmi://141.79.128.121:9999/TheRMIExample"; + System.out.println("Client: Looking up " + strName + "..."); + ServerInterface RMI = null; + + try + { + + RMI = (ServerInterface)Naming.lookup(strName); + + } + catch (Exception e) + { + System.out.println("Client: Exception thrown looking up " + strName); + System.out.println("Client: " + e.getMessage().toString()); + System.exit(1); + } + return RMI; + } + + +} -- cgit v1.2.3-55-g7522