Is there some way I can find the path to the java.exe that launched me?
In this case I am on Windows but if there is a general solution I would welcome it.
Added
FYI: In most cases my tool will be launched from a full path to an unregistered java.exe. e.g. C:\ABC\DEF\SDK\JRE\BIN\Java -jar MyTool.jar. Can I find the C:\ABC\DEF\SDK\JRE\BIN\.
Yes it is rather self-referential. 🙂
Generally speaking, there is no need for java.exe to launch java code. But you might want to look into the
java.homesystem property