I want linux script to kill java program running on console.
Following is the process running as jar.
[rapp@s1-dlap0 ~]$ ps -ef |grep java rapp 9473
if there are multiple java processes and you wish to kill them with one command try the below command
kill -9 $(ps -ef | pgrep -f "java")
replace "java" with any process string identifier , to kill anything else.