I've installed jdk 1.8.0_77. But when I run the cmd prompt in Windows I get this:
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) Client VM (build 25.77-b03, mixed mode, sharing)
I don't understand why the "compiler" version given is not the version that I just installed, and suspect that this is why I cannot compile or run from the command window. Does anyone know what I did wrong, or what I should do now?
The OS goes through the PATH from left to right. If it finds a java or javac installations, it uses the first one found and stops looking. Oddly enough if such a problem occurs, it is usually the other way round, that the java version is older than the javac version.