Every now and then, you need to run a server like JBoss, whose services bind to a handful of default ports (1099, 1098, 8080). And occasionally, you get a JVM_Bind error for these ports:
java.net.BindException: Address already in use: JVM_Bind Cause: java.rmi.server.ExportException: Port already in use: 1098;
The first (and more obvious) solution is to check that there isn’t already an instance of JBoss. Once you’ve made sure (by killing all java.exe/javaw.exe processes), how do you find out what program is still listening on a particular port?
Netstat will help you there.