Need Java program to listen on ports < 1024 w/o being root - possible
I am in AP Computer Science 3 on the highschool level and am working on my final project which is a client server chat/poker program written in java. We are not allowed to set up webservers on the school compters, so I trying to use my home linux web server hosting the client applet and also running the poker server program. The poker server listens on port 9999 but it seems that my school blocks outgoing connections to 9999. I know that they do not block ports 80, 21, 22, and 23 (and I assume most ports less than 1024) because I have established connections to my server via telnet.
The problem is: if I am a regular user and I try to run the server on ports less than 1024 I get a java security exception when it tries to bind to the port.
Is there a way to run my server on ports less than 1024 without being root?
Don't apache and other servers do this somehow?
PS I have tried setting the SUID bit for a script to run the server but that did not work, and if it did I think the server would still be running as root.