As a C++ app, is there a way to query a java process(java.exe/javaw.exe) to retrieve the main class or jar file name that was passed to the JVM? I want the same result as when you run "jps -l":
C:\>jps -l -V
2644 sun.tools.jps.Jps
4340 net.sourceforge.squirrel_sql.client.Main
I think I could get the command line parameter and try to parse for the class name, but I was wondering if there is simpler method to extract only the class name or jar file name reliably.
Thanks!