Have a read here first:
Then determine which version of java you need. There’s a handy table here:
Then you can find the version you need from the Adoptium website in the first link I sent and download and install it.
A few notes:
- Be sure to restart your machine after installing Java.
- If it still doesn’t show up, you may need to add Java to PATH. Google is great for this. Be sure to restart again after any changes you make to PATH.