Shell script to stop a java program -
Knowing a single name is a way to stop Java programs by using a shell script. I add ksh shell
To easily recognize this, add a unique property to JVM, e.g. For test.class,
java -Duniquename = 1 test
to kill it:
ps ax | Grep uniquename | Grep -v grep | Awk '{print $ 1}' | Kill Xargs
Comments
Post a Comment