In many recent situations, but right now I tried using a installer, that throws an error and says something along the lines of "Java not installed" even though the JAVA_HOME is set to the JDK installed by AdoptOpenJDK installer for Windows 10 64x. I couldn't find a way to fix it, anyways today I tried to install Netbeans 8.2 and it showed this error, but I found out you could pass an argument to the installer (--javahome ) then the error message changed from "JDK was not found (in your machine)" to "Couldn't find a JRE (in the location given)", which was even weirder. Then I passed the JRE as the javahome and it worked, which surprised me, in the installer you can choose which jdk should netbeans use and it correctly displayed the jdk installed. Sooo... why is this happening?
Edit: JAVA_HOME is "C:\Program Files\AdoptOpenJDK\jdk-13.0.2.8-hotspot\" and I didn't changed it for the duration of the installation
the --javahome argument was "C:\Program Files\AdoptOpenJDK\jdk8u242-b08-jre" and I realized after installing it that it wasn't in Path
But I'm 100% sure that "C:\Program Files\AdoptOpenJDK\jdk-13.0.2.8-hotspot\" was in Path, which is weird because supposedly according to something I read the AdoptOpenJDK installer installs the JDK with the JRE inside? or atleast shouldn't the JDK be a superset of the JRE?
Edit 2: I've left the JDK path as JAVA_HOME because of this answer. Should JAVA_HOME point to JDK or JRE?