By keeping firewall turnoff same problem is coming. How do i come to know that RMI registry is not running ? I am registring the server object to the RMI registry using the following method.
Naming.rebind("HelloServer",obj);
Have a look at my program too.
import java.rmi.*;
import java.rmi.server.*;
import java.util.*;
interface HelloInterface extends Remote {
public
String sayHello( ) throws RemoteException ;
}
class HelloServer extends UnicastRemoteObject implements HelloInterface{
public HelloServer( ) throws RemoteException {
super( );
}
public String sayHello( ) throws RemoteException {
return "Hello world, the current system time is" +new Date( );
}
}
public class RegisterIt {
public static void main(String [ ] args) {
try
{
HelloServer obj = new HelloServer( );
System.out.println("object instatiated" +obj);
Naming.rebind("HelloServer",obj);
System.out.println("Hello server bound in registry");
}
catch (Exception e)
{
System.out.println(e);
}
}
}