All versions
Java 25
Minecraft 26.1 was released on 2026-03-24. Mojang's version file lists Java 25 for it, for both the game and a server.
See which Java you have:
java -version
Download Java 25 from Adoptium