I have a Java program running on a Linux computer, and want to find the process ID (pid) of its process. I know the ps command can provide this information, but
ps
A simple way is to run this:
pgrep java