how to get java process id and kill the process id in unix or linux

i am running tomcat server in linux box and my problem is how to kill that process. and before killing how to get the process.

to fine the process id you can use below command:

ps -aef|grep java // If you want to kill java process

ps -aef|grep tomcat // if you want to kill tomcat process

After executing this you will get a process id which you can kill using command

kill -9 processid

as per the image kill -9 15492.

Hope this will help you a lot.

Answer is