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

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -