• Post Reply Bookmark Topic Watch Topic
  • New Topic

BindException  RSS feed

 
Ronak Patel
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
when i create new socket then i got bindexception.how to handle this.
bcoz of that i can't open new socket.
pls reply me rancher.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronak, can you give us the exception including the stack trace, and if possible an excerpt from your code showing where the exception was thrown?My powers of divination, unfortunately, are no longer what they were.
- Peter
 
Ronak Patel
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.net.BindException: Cannot assign requested address: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at chkSocket.run(chkSocket.java:79)
at java.lang.Thread.run(Unknown Source)
java.net.BindException: Cannot assign requested address: connect
Program is working ok if i do not use Thread.But i got this bindexception when i use Threadd.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!