How To stop an Executed Jar file

前端 未结 9 1840
时光说笑
时光说笑 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:21

    You can identify the process in taskmanager by looking for "java" or "javaw" processes. The problem will be in case you are running more than one java processes. If you are able to identify your process, simply kill/end it.

    Other way around:

    Run

    jps -lv
    

    which shows PIDs and command lines of all running Java processes. Determine PID of the task you want to kill. Then use command:

    taskkill /PID <pid>
    

    to kill the your jar process.

    0 讨论(0)
  • 2021-02-04 00:25

    Did you try to kill the java.exe processes in the taskmanager? It should stop then.

    0 讨论(0)
  • 2021-02-04 00:25

    if you are using a jframe and you want your application to stop when you click the "X":

    here's a tutorial: http://tips4java.wordpress.com/2009/05/01/closing-an-application/

    0 讨论(0)
提交回复
热议问题