Rmi connection refused with localhost

前端 未结 5 1289
离开以前
离开以前 2020-12-06 01:27

I have a problem using java rmi:

When I\'m trying to run my server, I get a connectException (see below).

Exception happens when executing the rebind method:

5条回答
  •  再見小時候
    2020-12-06 01:44

    It seems to work when I replace the

    Runtime.getRuntime().exec("rmiregistry 2020");
    

    by

    LocateRegistry.createRegistry(2020);
    

    anyone an idea why? What's the difference?

提交回复
热议问题