How do I find out if a specific JAR file is running on my machine or not? I just want to ensure that a specific JAR is only executed once at any time-- so if another request to execute the same jar comes in then I should not again invoke that jar.
I can use code for the above either as java code (which I will add to that JAR itself) or as shellscript (which I will use to invoke the jar file).
The machine will be a Linux machine-- either CentOS, or Debian or Ubuntu or Amazon Linux.