I've got many java processes running with different jar files. I want to kill on explicit jar file process.
the following command doesn't work successfully:
sudo kill $(ps -ef | grep example.jar | awk '{print $2}')
It finds the correct PID, but can't kill it.