如何在具有静态IP的计算机中解决绑定异常?

时间:2017-04-16 11:16:41

标签: java

我已将Internet IP设为静态。我正在尝试公开网络服务,而我收到此错误。

Caused by: java.net.BindException: Cannot assign requested address: bind
at sun.nio.ch.Net.bind0(Native Method)

以下是正常的网络服务代码。

public class HelloWorldPublisher{

   public static void main(String[] args) {
      Endpoint.publish("http://my_static_ip:9999/ws/hello", new HelloWorldImpl());
     }
}

我该如何解决这个问题?

0 个答案:

没有答案