Remote method invocation port in use

后端 未结 6 1072
不思量自难忘°
不思量自难忘° 2020-12-05 03:29

I have created a Server, Client kind of program with RMI. But whenever I run my Server after starting the rmiregistry from command prompt, the port already in use error is t

6条回答
  •  难免孤独
    2020-12-05 04:10

    The rmiregistry is using port 1099 in its process so you can't use it in yours. Either:

    1. Start the registry in the same process, via LocateRegistry.createRegistry() (preferred).
    2. Export your object on a different port.
    3. Start the rmiregistry on a different port other than 1099.

提交回复
热议问题