How to kill Tomcat when running it from Eclipse?

后端 未结 5 2042
粉色の甜心
粉色の甜心 2021-01-31 03:25

I am running the Tomcat that gets delivered with your Eclipse download (no, I don\'t want to download and install the entire Tomcat), and sometimes it hangs when stopping or res

5条回答
  •  长发绾君心
    2021-01-31 03:45

    If you use Linux, try the following steps.

    1. List Tomcat processes (e.g., ps aux | grep catalina)
    2. Locate the strings that look like this: myname 2244 5.5 0.3 57020937 2110741 ? Sl Oct03 5160:01 /usr/lib/jvm/java-1.8.0-<...>/bin/java <...> org.apache.catalina.startup.Bootstrap start
    3. Copy-paste everything between /usr/lib/jvm/<...> and <...>.Bootstrap
    4. Add stop at the end of your command and run it

    Essentially, you would take the very same command that was used by Eclipse to start Tomcat and modify the last argument to stop Tomcat.

提交回复
热议问题