Java RMI Client and Server Separate Machines -
i want edit rmi hello world example work client , server on different machines, i'm stuck unmarshalling return error.
if run client , server in same project on netbeans work fine when split them edited try statement on client side be:
try { registry registry = locateregistry.getregistry("localhost"); string[] c = registry.list(); system.out.println(c[0].tostring()); remote lookup = naming.lookup("helloserver"); } catch (exception e) { system.out.println("helloclient exception: " + e.getmessage()); } without remote lookup = naming.lookup("helloserver");, print command gives "helloserver" correct, when create remote object i'm getting error:
helloclient exception: error unmarshalling return; nested exception is: java.lang.classnotfoundexception: rmimain.hello i've tested policy , it's working fine, appreciated.
your client doesn't have rmimain.hello class on classpath.
Comments
Post a Comment