To kill all with one command use killall -9 java (killall uses names of processes and not pids to kill them)