Michele Volpato

Michele Volpato

How to fix 'To use the 'java' command-line tool you need to install a JDK' error

Tips

You can solve the error “To use the “java” command-line tool you need to install a JDK. Click “More Info…” to visit the Java Developer Kit download website.” on macOS, by installing a version of the JDK.

Fix you need to install a jdk error

You do not need to install the official Oracle ones, you can install the AdoptOpenJDK ones by running

brew cask install adoptopenjdk

This will save you a preference panel in System Preference, and you can manage the installation with brew cask.

Get a weekly email about Flutter

Subscribe to get a weekly curated list of articles and videos about Flutter and Dart.

    We respect your privacy. Unsubscribe at any time.

    Leave a comment