I have written java programs for Client and Server. But, to run the program I need to start rmi registry manually! How to start RMI registry through java code (through Server)?<
Use LocateRegistry.createRegistry(port). See javadoc.
LocateRegistry.createRegistry(port)