java - Error: Cannot assign requested address: JVM_Bind -


when used

 inetaddress addr = inetaddress.getbyname("192.168.1.104");  listen_socket = new serversocket(port,5,addr); 

then works fine

but when use dynamic ip

  inetaddress addr = inetaddress.getbyname("114.143.95.69");   listen_socket = new serversocket(port,5,addr); 

the following error thrown

error: cannot assign requested address: jvm_bind

what should resolve problem?

your dynamic ip address of router, not ip address belonging nic of localhost.

use "0.0.0.0", or null inetaddress, parameter.


Comments

Popular posts from this blog

ios - Change Storyboard View using Seague -

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -