This guide will let you know how to fix Java Runtime Environment Not Found error for Minecraft PC Windows.
1- Any Minecraft version above 1.16.5 will require you to have the newest java version which is java 18th and any version below Minecraft 1.16.5 will require you to have java 8. It is the reason you’re getting an error regarding your java installation while trying to run Minecraft
2- If you have two java instances on your computer, then you will also get this error. Make sure that you only have the right java instance on your computer.
3- To check this, click on the Windows button at the bottom left side of the screen and then write add or remove the program. After that, click on it to open it. On the right side of the search list, type java and it will let you know what java version you are running on your PC.
4- To get the latest version of java, click on the following link https://itzcubatutorials.com/install-java-18-easily/. Once you reach this site, click on the Download java button as it will take you to the official java download page.
5- Then select the java version you want to download from the top, scroll down and then click on the x64bit installer link.
6- Once the Set up file is downloaded, you need to install it into your PC. After this, your issue will be fixed.