mac closes the tomcat process

When running Java frequently, such as running a Spring Cloud Boot project, you don't know where to close it, and the port is occupied. If you modify the program and start it again, an error will be reported.

execute the command first 

ps -ef | grep java 

Check which Java programs are running. If tomcat is started, you can also check its process ID, for example:

501 33777 30392   0  1:08下午 ??         0:13.06 /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:63422 -Dfile.encoding=UTF-8 -classpath /Users/liufang/Workspaces/MyEclipse Spring 2014/cloud-simple-helloword/target/classes:/Users/liufang/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.3.5.RELEASE/spring-boot-starter-web-1.3.5.RELEASE.jar......

 

Execute the command: kill -9 33777 to close the project and run it again

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325064374&siteId=291194637