0

is there any way to kill Java process with name(returned with jps command) instead of PID?

0

1 Answer 1

1

Here is the command to kill the Java process by is Process Name instead of its ProcessID.

kill `jps | grep "DataNode" | cut -d " " -f 1`
Sign up to request clarification or add additional context in comments.

2 Comments

This works well. Is there any command like jps which can kill the java process just by specifying the Main class as argument to command. I am looking for a command like command kill <DataNode>
Search for javaw.exe in Task Manager and from there you can kill it.. Otherwise try this pkill -9 -f <nameOfYourJavaAplication>

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.