I am working on a Java EE Application in a Windows environment. (I am using Windows 7)
I am using Tomcat Server, unfortunately port number 8080 is busy (used by Oracle). Now I want to assign a different port to Tomcat.
So before changing inside conf/server.xml file, I want to make sure that a certain port is not occupied by any other process and it’s free.
You can use “netstat” to check whether a port is available or not.
Use the
netstat -anp | find "port number"command to find whether a port is occupied by an another process or not. If it is occupied by an another process, it will show the process id of that process.You have to put : before port number to get the actual output
Ex
netstat -anp | find ":8080"