How to find out a process PID on Windows

Today I tried to install Jenkins on my laptop (Windows 7). However it failed with the following error,

D:\>java -jar jenkins.war
Running from: D:\jenkins.war
webroot: $user.home/.jenkins
Jun 28, 2014 4:57:26 PM winstone.Logger logInternal
??: Beginning extraction from war file
Jun 28, 2014 4:57:45 PM org.eclipse.jetty.util.log.JavaUtilLog info
??: jetty-8.y.z-SNAPSHOT
Jun 28, 2014 4:57:53 PM org.eclipse.jetty.util.log.JavaUtilLog info
??: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: C:\Users\luhuang\.jenkins found at: $user.home/.jenkins
←[33mJun 28, 2014 4:57:59 PM org.eclipse.jetty.util.log.JavaUtilLog warn
??: FAILED SelectChannelConnector@0.0.0.0:8080: java.net.BindException: Address
already in use: bind
java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)

I checked in the cmd,
C:\Users\luhuang>netstat -a -n -o > a.txt
And in the a.txt, it has one line ‘ TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 5252’
C:\Users\luhuang>tasklist /svc /FI “PID eq 5252”

Image Name PID Services
========================= ======== ============================================
java.exe 5252 N/A

It is a process running by GlassFish. Stop it, C:\glassfish4\glassfish\bin\stopserv.bat
And it is able to run Jenkins.