I'm thinking maybe check if java.home starts with the current execution path, e.g.
<install.dir>/jre
But, launchers can be configured to change the working directory, or they can be placed somewhere else but the installation root. Also unsure where the jre would be placed on MacOS.
Is there a more reliable way to do this?
Context: For our custom update mechanism I need this information to determine the correct mediafile (with or without bundled JRE).
