Hi,
I’m using MyEclipse 8.6 on Mac OS X 10.6. My web application wants to listen to incoming SNMP requests (UDP port 162). Now when running inside Tomcat in MyEclipse, the port binding fails, and I get the following exception, probably because only the UNIX root user can access ports < 1024:
java.net.BindException: Permission denied
at java.net.PlainDatagramSocketImpl.bind0(Native Method)
at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
at java.net.DatagramSocket.bind(DatagramSocket.java:372)
at java.net.DatagramSocket.<init>(DatagramSocket.java:211)
at java.net.DatagramSocket.<init>(DatagramSocket.java:262)
at java.net.DatagramSocket.<init>(DatagramSocket.java:235)
Now I already run MyEclipse as root (launched from a terminal window with “sudo open”), but I can’t seem to get the JVM for Tomcat to run as root, either. When I launch Tomcat manually from a terminal as root (“sudo ./startup.sh”) then the app works just fine, and the port binding works.
So, how can I make Tomcat run with “sudo” in MyEclipse on the Mac?
Karsten