# How to resolve JDK issue when building Android on macOS Big Sur

**URL:** <https://forums.fusetools.com/t/how-to-resolve-jdk-issue-when-building-android-on-macos-big-sur/8114>\
**Category:** How-to Discussions\
**Created:** [March 10, 2021, 1:28pm UTC](https://forums.fusetools.com/t/how-to-resolve-jdk-issue-when-building-android-on-macos-big-sur/8114 "2021-03-10T13:28:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeq](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/aeq/32/129_2.png) [@aeq](https://forums.fusetools.com/u/aeq)\
**Post date:** [March 10, 2021, 1:28pm UTC](https://forums.fusetools.com/t/how-to-resolve-jdk-issue-when-building-android-on-macos-big-sur/8114/1 "2021-03-10T13:28:34Z")

</div>

If you get the following compiler issue:

```auto
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

```

Use this command to see java paths: `/usr/libexec/java_home -V | grep jdk`

My results were:

```auto
Matching Java Virtual Machines (2):
    1.8.271.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_222 (x86_64) "AdoptOpenJDK" - "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

```

Copying `tools.jar` in `/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/` to `/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/` solved the problem.

Ref:

> <https://stackoverflow.com/questions/64968851/could-not-find-tools-jar-please-check-that-library-internet-plug-ins-javaapple/65211651#65211651>

You may have to setup JAVA\_HOME in your .zshrc:

> <https://stackoverflow.com/questions/64968851/could-not-find-tools-jar-please-check-that-library-internet-plug-ins-javaapple/64987486#64987486>
