I m trying to create hello world example using rmi but till not succeeded.I got error in server file "Server Error java.rmi.ConnectException: Connection refused to host: 192.168.1.5; nested exception is: So please help me out.
public class Server implements Hello
public String sayHello()
return "Hello World!";
public static void main(String arg)
Server obj = new Server();
Hello stub = (Hello)UnicastRemoteObject.exportObject(obj,0);
Registry registry = LocateRegistry.getRegistry();
1 Year Ago
Related Article:Issue in java rmi
is a Java discussion thread by manish250 that has 1 reply, was last updated 1 year ago and has been tagged with the keywords: java, rmi, server.