Java RMI - automating in an IDE
I've been able to get the java RMI running in linux / windows through some command prompt action (http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html goes into the gory details) but wondering if there is a way to do from within the IDE (i use netbeans).
Perh开发者_如何学运维aps through an ant script or something? how do you do it?
If you are speaking about starting a registry with rmiregistry
, then you can start a registry inside your server process.
To do it, in Server
replace
Registry registry = LocateRegistry.getRegistry();
with
Registry r = LocateRegistry.createRegistry(Registry.REGISTRY_PORT);
I know you stated you use NetBeans, but I've found this plugin for Eclipse very useful.
精彩评论