How To stop an Executed Jar file

前端 未结 9 1844
时光说笑
时光说笑 2021-02-03 23:20

It feels like a dumb question to ask, but i cant seem to figure it out. when i run a *.jar file on windows it doesnt apears in the taskmanager processes. how can i terminate it

9条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-04 00:01

    On Linux

    ps -ef | grep java

    It will show u a list of processes out of which one will be your executable jar. Just kill that process by its process id.

    sudo kill -9

    Is there any way to do this from the java code of the same jar file. Like killing itself once process completed.

提交回复
热议问题