I can't understand java updates.
Using Windows 10, When I go to C:\Program Files\Java I have 3 folders:
-jdk1.8.0_221
-jre1.8.0_251
-jre1.8.0_261
When I open cmd and type java -version I get:
java version "1.8.0_261"
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
When I type javac -version I get:
javac 1.8.0_221
I checked environment variables, It has noting associating with Java.
When I type in cmd where java I get:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
C:\Program Files\Java\jdk1.8.0_221\bin\java.exe
And when I type where javac I get:
C:\Program Files\Java\jdk1.8.0_221\bin\javac.exe
The questions:
- If 1.8.0_261 is lateast java version, why when I update it only updates jre and not jdk? why jdk is staying at 221?
- Even if jdk lateast version is 221 and jre lateast version is 261, why it keep saving the jre 251 folder? why it doesnt delete it? should I delete it?
- Why my javac is not updating as well? Why the "where" command pointing stright to the 221 folder name.. Does it change when I update?
Thanks.
javacis the compiler and is only part of the jdk.javacand the other development tools. (On Linux (RHEL, Ubuntu, etc), the package manager will update both sets of tools ... when you tell it to.)