DavidH
DavidH

Reputation: 33

JAVA RMI Client

I have the problem that my RMI Application Client isn't working when i hit the "run" Button in Eclipse. It throws the following exception:

java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
java.net.MalformedURLException: unknown protocol: rsrc
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
...

I looked on the internet and people seem to have that problem when generating JARs from eclipse. But my (ant-built) jars work fine, just inside Eclipse it's not doing as it should!

 InterfaceRemota objetoRemoto = (InterfaceRemota)Naming.lookup("//localhost:1097/ObjetoRemoto");

Upvotes: 1

Views: 1105

Answers (1)

DavidH
DavidH

Reputation: 33

I found a solution, before starting the rmiregistry server I have to clean the java classpath using "set CLASSPATH="

c: > set CLASSPATH=

c: > rmiregistry

Upvotes: 1

Related Questions