Post

Replies

Boosts

Views

Activity

Reply to Java Runtime not found
Hi Keith, I had a similar issue with react native but I think installing Java (JRE) is creating a new problem while partly fixing the original. For whatever reason your computer can't find your installed version of JDK. Either a path issue or another issue with the JDK install. This could potentially be fixed by simply updating your Java path in your terminals profile (.profile, .bash_profile, .zshrc, etc). i.e Make sure JAVA_HOME environment variable is set to the JDK’s folder. - if not reinstall JDK (instructions bellow) When you install Java (JRE) and try build your app, the build now finds Javas JRE which has everything it is needs to run Java but not build it, this is why the new error is Could not find tools.jar.. The JDK includes the compiler (javac) and tools (like javadoc and jdb) and is what is needed to build your app. You then fixed the second error by forcing gradle (build tool) to look in the correct folder for your JDK. I would recommend fixing this issue fully by first removing the Java you installed by running the following in your terminal: sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane sudo rm -fr ~/Library/Application\ Support/Oracle/Java And then reinstalling the JDK via brew by running: brew reinstall adoptopenjdk8
Jan ’22