I encountered a problem with the Java version I am using for running some .jar files in my command prompt (Unsupported major.minor version 52.0), I checked the version used for compiling and running in IntelliJ IDEA (JDK 11.0.9) so I supposed It came from the version I am using in my prompt.
So what I did was changing the JAVA_HOME to “C:\Program Files\Java\jdk-11.0.9” and add it to both user and system variables (“C:\Program Files\Java\jdk-11.0.9\bin”).
To check if this was done correctly I typed :
javac – version : javac 11.0.9 (correct)
But when I checked
java –version
It gives me the following error: “Error could not open C:\Program Files\Java\jre7\lib\amd64\jvm.cfg" which is totally normal because I just removed this directory but I expected my prompt to use the new path..
Can anyone help ?