For any lost soul that already has the right JRE installed (321 x64 in my case), the JAVA_HOME set correctly ("C:\Program Files\Java\jre1.8.0_321" in my case) and still getting this "Java not found" error:
You need to install the "Visual C++ Redistributable for Visual Studio 2015":
https://www.microsoft.com/en-us/downloa ... x?id=48145
That's it.
PS: I am on a vanilla Windows 11 install so this was really the difference between an undetected and an detected Java.