Run rmiregistry and rmi-server in one application

As the topic suggests: Is it possible to have ONE application, that combines the rmiregistry and the rmi server part?
[124 byte] By [Cdomsch] at [2007-9-27 18:26:30]
# 1
It is possible, if you are not doing automatic class file downloading.The problem is that if rmiregistry can find the rmi stubs in its classpath, it will not annotate the remote references that it serves with the codebase.
daney at 2007-7-6 19:05:39 > top of Java-index,Core,Core APIs...
# 2

start RMIRegistry in your server part using LocateRegistry.createRegistry(port) or LocateRegistry.getRegistry(port)

Bill

======================================

public static synchronized Registry getRMIRegistry(int port) throws Exception

{

Registry rmiReg=null;

try

{

rmiReg=LocateRegistry.createRegistry(port);

}catch (Exception e)

{

rmiReg=LocateRegistry.getRegistry(port);

}

return rmiReg;

}

zhangwx98 at 2007-7-6 19:05:39 > top of Java-index,Core,Core APIs...
# 3
Thanx to both of you.I think I will stay with seperatly starting the registry.
Cdomsch at 2007-7-6 19:05:39 > top of Java-index,Core,Core APIs...