It will return the jvm's version your code is running on. For example
System.getProperty("java.runtime.version"); you will get the runtime version, e.g.
System.getProperty("java.home"); you can find the installation directory for JRE the VM is running.
You can also get the
"java.version" if you prefer.
Here's the reference for other System Properties that may be helpful.
So I found the easiest way to do this is to open task manager and right click the task i want to inspect. Right click and select go to process. After this I can select Properties and then the Details tab. This will show me the version of Java used for this process.