I need to get the name of the Java program thats being executed by Java, from a C# program. I have no access to the Java program (aka I’m not the one who wrote it, so I can’t make it communicate with my C# program.) Is it possible to do this?
Share
There is a command line tool that comes with the JDK called ‘jps’. jps -v shows all the arguments you have passed to java.
You can call jps from c# and then read the output.
Hope this helps.