So Portnummer von 8080 in macOS
$ lsof -i :8080 | grep LISTEN
java 42975 mkyong 57u IPv6 0xf10ca37d995a077f 0t0 TCP *:http-alt (LISTEN)
Energetic Elk
$ lsof -i :8080 | grep LISTEN
java 42975 mkyong 57u IPv6 0xf10ca37d995a077f 0t0 TCP *:http-alt (LISTEN)
lsof -n -i4TCP:8080 | awk '{print$2}' | tail -1 | xargs kill -9
$ ps -ef 42975
UID PID PPID C STIME TTY TIME CMD
501 42975 42960 0 12:41PM ?? 0:29.84 /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java
-Dcatalina.base=/Users/mkyong/Documents/workspace-new/.metadata/.plugins/org.eclipse.wst.server.core/tmp1
-Dcatalina.home=/Users/mkyong/apache-tomcat-8.0.28
-Dwtp.deploy=/Users/mkyong/Documents/workspace-new/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps
-Djava.endorsed.dirs=/Users/mkyong/apache-tomcat-8.0.28/endorsed
-Dfile.encoding=UTF-8 -classpath /Users/mkyong/apache-tomcat-8.0.28/bin/bootstrap.jar:
/Users/mkyong/apache-tomcat-8.0.28/bin/tomcat-juli.jar:
/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/lib/tools.jar
org.apache.catalina.startup.Bootstrap start