Close java(.jar) specific program with C++

Asked

Viewed 120 times

0

I have a program running in java, I would like to close it if necessary with a monitor written in C++. As in taskmgr only java.exe appears, how to close the specific.jar program?

  • 1

    The jps command shows all *.jar that are running on the JVM that contains a PID that you can give a Kill to that specific *.jar.

  • Programs that run inside the JVM tend to run on top of the same java.exe process, I do not think there is differentiation, because who is running, in fact, is the java and not its program itself.

  • ok, but I can’t kill java.exe because it would also bring down other services, I’m started the . jar by system("start..."), have to call and already catch the pid at this time? Obs: using windows 10.

  • So in Windows I don’t know how to do it, because I’ve never done it. Work with distributed application, each with its own jar. Sometimes in place I have to kill only one I used the JPS got pid and give Kill the other applications keeps running

  • https://wiki.scn.sap.com/wiki/display/SAPMOB/How+to+use+Microsoft++PsTools%28Psexec%29+and+jstack+to+help+Trouble+shoot+a+Hanging+SUP+Server .

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.