title: java.net.BindException: Permission denied when creating a ServerSocket on Mac OSX
body: <p>I Tried to run a Java socket in mac with eclipse but it doesn't work. I got this error: </p>
  
  <pre><code>Exception in thread "main" java.net.BindException: Permission denied
  
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:521)
      at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:414)
      at java.net.ServerSocket.bind(ServerSocket.java:326)
      at java.net.ServerSocket.&lt;init&gt;(ServerSocket.java:192)
      at java.net.ServerSocket.&lt;init&gt;(ServerSocket.java:104)
      at server.MessageServer.main(MessageServer.java:11)
  </code></pre>
  
  <p>How can i make it to run?</p>
  
  <pre><code>package server; //ChatServer 
  import java.io.*; 
  import java.net.*; 
  
  public class MessageServer { 
  
  public static void main (String args[]) throws IOException { 
      int port = 100; 
      ServerSocket server = new ServerSocket (port); 
      System.out.println("Server is started!"); 
  
      while (true) { 
          Socket client = server.accept (); 
          System.out.println ("Accepted from " + client.getInetAddress ()); 
          MessageHandler handler = new MessageHandler (client); 
          handler.start(); 
          } 
      } 
  }
  </code></pre>