I noticed that the command in my case, is not listing all Java processes. If I run
pidof java I get one single pid as a response. On the other hand, if I run
ps aux | grep [j]ava I get a three different pids/Java processes. Any ideas on why this is?