java.net.BindException: Permission denied [Solved]

Written by  //  June 28, 2011  //  Java  //  4 Comments

 

Hi !
Today i was trying to create a simple Java server using NetBeans on a Linux machine, using this simple code : (which worked well on Windows);

ServerSocket serv = new ServerSocket(99);
serv.accept();

but when i executed the code i got this error saying :

java.net.BindException: Permission denied

after some researches i found that all ports below 1024 are reserved for privileged & system processes, so i changed the port number & it worked like a charm.

i hope this post helped someone somewhere ;)

Incoming search terms:

  • java net bindexception: permission denied
  • java net bindexception permission denied
  • bindexception permission denied
  • Error: java net BindException: Permission denied
  • java bindexception permission denied
  • java net bindexception: permission non accordée
  • java net bindexception permission non accordée
  • java java net BindException: Permission denied
  • mac java net BindException: Permission denied
  • error in javajava net bindexception: permission denied
  • ArkhamAA

    Thanks a ton! I know this post is old, but it helped me a lot :)

    • izmBlog

      Your welcome ArkhamAA, i’m glad it helped you ;)

  • http://twitter.com/Justcallmechika RUNN1NGC4YOT3

    You are a life saver! I am using a mac not linux but it works a charm..!! Thanks..!!

    • izmBlog

      yes it should be the same on mac too because it is based on unix… the same for linux.

      thank you for your kind comment & you’re welcome!