can't run GlassFish because something is using port 8080; but how to find it?
NMAP will provide a listing of open ports and programs that are currently using them. It is actually a powerful networking tool that can perform a wide variety of network maintenance tasks.

You can read more about it here: http://nmap.org/book/inst-macosx.html

It is a small commandline utility (although GUI front-ends are available) that is quite easy to use and should give you a detailed view of your current network state.