We are trying to launch the Gradle wrapper using install4j which includes its own JRE. The wrapper launches with the included JRE, but the gradle daemon does not use the bundled JRE. How can we force the daemon to use the bundled JRE and not a different JRE that the user may have installed on their machine?
Relevant install4j code: https://pastebin.com/raw/B2Y7qwGB
Update: After going through Gradle’s source, it appears that the daemon (along with the launcher) should use whatever Java the wrapper is launched with since their main methods are invoked via reflection within the same process as the wrapper.