I have done two hybris project setups as (Hybris v5.6 – Java 1.8) and (Hybris v20.005 – Java 11). I switch the Java-11 to Java-1.8 (jdk,jre bin path settings) at system env variables, to make the (Hybris v5.6) running.
Even though the system env variables are set up with Java-1.8 but the ant build at the (Hybris v5.6) gives the error message as below and says current Java version is :11 (see the below message clearly). I have cross-verified java version on command prompt using the command (java -version) and it says as (openjdk version "1.8.0_242")
**** WRONG JAVA VERSION **** Environment check failed: You are using a not supported version of Java. Please make sure you are using Java version 1.7 or later. Your current Java version is: 11
Please give me a clue from where it could override the java version or any other solutions?
Source: Windows Questions