The snapshots for 1.18 are done as we move into a new phase of Minecraft betas for the upcoming update, and the changes are getting more technical as we go. 1.18 pre-release 2 upgrades the Java version, and makes a bunch of bug fixes. That’s it! And that means we’re probably very close to the Minecraft 1.18 release date.
Minecraft runs on Java version 17 as of this pre-release – and you can expect the same to be true of the live version of Java Edition once 1.18 officially lands. Minecraft
Read more on pcgamesn.com