In this guide, you will find how to fix the “Unable to locate a Java runtime” ERROR ON MAC. Go through the guide and follow the simple steps to fix it.
First, you have to open the browser, then search for java download and click on Java download oracle. On this website, you have to scroll down and ensure that the latest version of Java which is 18 is selected. Then you have to select the Mac-os tab. Now if you have a mac with an intel chip, you need to download the last option but if you have a mac with an Apple M1 chip, then you have to download the ARM version.
Once the download completes, you have to open that file but if it does not open, then you have to go to system properties. Click on Security and Privacy. Then you have to click on Open anyway. Then the installer will open and then you have to install this software. After this, your issue will be fixed.