blob: 58df1734c4b3e5057d0aaee64177931c4c6a2921 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
}
}
|