• Post Reply Bookmark Topic Watch Topic
  • New Topic

exception in thread "main"

 
neo
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i have written a server and cliebt socket program. I have compiled them and .class files were created. the problem is when it is executed,it is displaying the following "Exception in thread "main" java.net.SocketException: permission denied: listen failed
at java.net.PlainSocketImpl.socketListen(Native Method)
at java.net.PlainSocketImpl.listen(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at Server1.main(Server1.java:12) "
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by k naresh:
java.net.SocketException: permission denied: listen failed


Sounds like either your user or application does not have permission to bind to a socket. Have a look at Permissions in the JDK.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!