tags:

views:

56

answers:

2

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).

Perhaps through an ant script or something? how do you do it?

A: 

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);
axtavt
that is pretty cool! thanks for that, so just one more thing left:the standard java instructions say i should pass this to the compiler-classpath ~/NetBeansProjects/Example/build/classes -Djava.rmi.server.codebase=file:~/NetBeansProjects/Example/build/classes/Is there a workaround for this too perchance?
oneAday
It's not needed for the simple case when the .class files for the classes being transferred between client and server are available on the client side.
axtavt
A: 

I know you stated you use NetBeans, but I've found this plugin for Eclipse very useful.

Peter