Rmi connection refused with localhost

前端 未结 5 1303
离开以前
离开以前 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 02:01

    it seems that you should set your command as an String[],for example:

    String[] command = new String[]{"rmiregistry","2020"};
    Runtime.getRuntime().exec(command);
    

    it just like the style of main(String[] args).

提交回复
热议问题