I downloaded JRE first. Then downloaded JDK.
My JRE is in this directory
C:\Program Files (x86)\Java\jre1.8.0_291
My JDK is in this directory
C:\Program Files\Java\jdk-16.0.1
Running java -version command yields the following :
C:\Program Files (x86)\Java\jre1.8.0_291\bin>java -version
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) Client VM (build 25.291-b10, mixed mode, sharing)
C:\Program Files\Java\jdk-16.0.1\bin>java -version
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
does that mean I have a duplicate JRE?
If so, why there is no JRE in C:\Program Files\Java\ ?
"If you want to run Java programs, but not develop them, download the JRE. If you want to develop Java applications, download the Java Development Kit, or JDK. The JDK includes the JRE, so you do not have to download both separately."
reference: JDK 7 and JRE 7 Installation Guide https://docs.oracle.com