I still use Java 7 for all my coding projects (this is a company policy issue), but I installed Java 8 for one third-party project, to which I contribute. Now it seems that I cannot install Java 8 on Windows 7 x64 and still use Java 7 by default:
C:\>"%JAVA_HOME%\bin\java.exe" -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
C:\>java.exe -version
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)
As you can see, JAVA_HOME is completely ignored.
I also have Java in the path using "% JAVA_HOME% \ bin" that correctly enable Java 7 when I check the path in the DOS window, but it still doesn't matter.
I checked in the "Java Control Panel" (not sure if this affects the default version of Java for the command line). On the tab "Java", "View ...", you will see the "registered" version of Java. I can add all versions under the "User" tab, but in the "System" section there is only Java 8, and there is no way to change it.
Am I missing something, or is Oracle just unable to use Java 7 if I do not remove the installation of Java 8? I don’t want to indicate “source” and “target” everywhere, and I don’t even know if I can specify it wherever Java is used.
EDIT: , Java. Java7 ( 86, 64), Java8 ( 86, x64). , x64 JDK . , Java8 . JDK 7 x64 JDK 8 x64. , JDK7 x64, , "" "java.exe", "Windows" ( , ).