Every time a big Java security advisory lands, the same question turns up in team chats and family group chats: "I ran java -version, it printed something. Am I affected?" The command is the easy part. Reading the output is where people slip, because Java has used two numbering styles and every vendor adds its own build numbers on the end.
This is a short decoding guide. It doesn't replace the vendor advisories; it helps you read them.
Step 1: Find the major version
Run java -version in Terminal and look only at the first line.
-
java version "1.8.0_NNN"is Java 8. The "1." prefix is the old naming style, so 1.8 means 8, and NNN is the update number. -
openjdk version "11.0.x"is Java 11. -
"17.0.x","21.0.x","25.0.x","27.0.x": from Java 9 onward the first number is the major version.
The most common mistake is reading "1.8" as "Java 1" and assuming it's ancient and irrelevant. It's Java 8, which is still on plenty of machines.
Step 2: Find the vendor
The second line usually names who built it: Oracle, Microsoft, Eclipse Temurin, Zulu and so on. Write it down. The vendor decides two things: which advisory applies to your build numbers, and where updates come from.
Step 3: Compare against the vendor's numbers, not someone else's
This is where most "am I patched?" confusion comes from. For the November 2026 Java4Shell flaw (CVE-2026-114938), the OpenJDK advisory of 17 November lists Java 17, 21, 25 and 27 as affected up to builds like 17.0.21.0.3 and 21.0.13.0.3 in OpenJDK numbering. Microsoft's own release post says its fixed builds are 17.0.21.1, 21.0.13.1 and 25.0.5.1.
Those strings look similar but belong to different numbering schemes. Comparing a Microsoft build against the OpenJDK table, or an Oracle build against Microsoft's post, can give you the wrong answer in either direction. Match vendor to vendor.
Java 8 and 11 are not listed for that particular CVE in the OpenJDK advisory, but they did get other fixes in the same release, so "not affected by Java4Shell" isn't the same as "nothing to update".
Step 4: Remember java -version only shows one Java
The command reports the first java.exe on your PATH. A machine can have several, plus private copies bundled inside apps that never appear on the PATH or in Installed apps. where java lists every copy on the PATH; bundled copies only get fixed when the app that ships them updates.
A quick worked example
Say the first line reads openjdk version "21.0.x" and the second line mentions Microsoft. That's Java 21, Microsoft build. You'd skip the OpenJDK table and check Microsoft's release notes for its fixed 21 build. If a program you use needs it, update from Microsoft. If nothing needs it, uninstalling is the simpler fix.
If you want the full walkthrough, including the Installed apps check, the About Java window for Oracle Java 8, and an update-or-uninstall table, TechGuide HQ has a guide on how to find and read your Java version on Windows 11, with the Java4Shell affected ranges.
Cheat sheet
- First number after "1." in old strings = major version (1.8 = 8).
- From 9 onward, first number = major version.
- Second line = vendor. Use that vendor's advisory.
- One command, one Java. Use
where javato see the rest. - Download updates only from the vendor's own site, never from a pop-up.
Top comments (0)