打开电脑终端
输入:ps -e | grep java
此时会显示tomcat的PID,
511 ?? 0:24.13 /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -Dcatalina.base=/Users/mr_yi/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 -Dcatalina.home=/Users/mr_yi/Documents/apache-tomcat-7.0.69 -Dwtp.deploy=/Users/mr_yi/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps -Djava.endorsed.dirs=/Users/mr_yi/Documents/apache-tomcat-7.0.69/endorsed -Dfile.encoding=UTF-8 -classpath /Users/mr_yi/Documents/apache-tomcat-7.0.69/bin/bootstrap.jar:/Users/mr_yi/Documents/apache-tomcat-7.0.69/bin/tomcat-juli.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/lib/tools.jar org.apache.catalina.startup.Bootstrap start
此时PID既是511
输入 kill -9 511即可解决进程被占用的问题,问题解决。
网友评论