I have my path
environment variable set to contain my Java 7 bin folder (C:\Program Files\Java\jdk1.7.0_55
). Printing the path
variable to the console indeed confirms that no other Java\bin
folders are in it.
Still when I run the command java -version
the printout is as follows:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
In addition to Java 7, I also have Java 6 and Java 8 installed. All of the installations are JDKs with separate JREs also installed.
Why is Java 8 ran and not Java 7 in this case (by both, the old fashioned command prompt and Powershell)?