# Cannot find java error - bigsur M1

**URL:** <https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607>\
**Category:** Autopsy Help\
**Created:** [April 27, 2021, 12:26am UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607 "2021-04-27T00:26:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![wildphish](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wildphish](https://sleuthkit.discourse.group/u/wildphish)\
**Post date:** [April 27, 2021, 12:26am UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/1 "2021-04-27T00:26:21Z")

</div>

Unable to run autopsy, get an error “Cannot find java. Please use the --jdkhome switch” .  
This is what I see:

```
> echo $JAVA_HOME
> /Library/Java/JavaVirtualMachines/liberica-jdk-8-full.jdk/Contents/Home
> java -version
> openjdk version "1.8.0_292"
> OpenJDK Runtime Environment (build 1.8.0_292-b10)
> OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
> ls /usr/local/share/java/
> sleuthkit-4.10.2.jar sleuthkit-caseuco-4.10.2.jar
> ./autopsy
> The operation couldn’t be completed. Unable to locate a Java Runtime that supports (null).
> Please visit http://www.java.com for information on installing Java.
> 
> Cannot find java. Please use the --jdkhome switch.
> pwd
> /Users/<redacted>/Downloads/autopsy-4.18.0/bin

```

What can I do to fix this? I’m running on bigsur mac (M1) and followed [https://slo-sleuth.github.io/tools/InstallingAutopsyOnMacOS.html](https://slo-sleuth.github.io/tools/InstallingAutopsyOnMacOS.html) to install.

---

<div class="post-metadata">

**Author:** ![seaturtle15](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/seaturtle15/32/1366_2.png) [@seaturtle15](https://sleuthkit.discourse.group/u/seaturtle15)\
**Post date:** [May 3, 2021, 6:36pm UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/2 "2021-05-03T18:36:14Z")

</div>

I had the same problem, but after reading the launch script, I figured out what was wrong.

In the installation guide, replace all instances of $JAVA\_HOME with $jdkhome .

Or, what I found easier, just insert

jdkhome="$JAVA\_HOME" in line 83 or earlier.

---

<div class="post-metadata">

**Author:** ![Investigator](https://avatars.discourse-cdn.com/v4/letter/i/45deac/32.png) [@Investigator](https://sleuthkit.discourse.group/u/Investigator)\
**Post date:** [May 7, 2021, 7:42pm UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/3 "2021-05-07T19:42:34Z")

</div>

@seaturtle15 are you saying that you actually managed to get Autopsy run on an M1?

---

<div class="post-metadata">

**Author:** ![seaturtle15](https://yyz2.discourse-cdn.com/free1/user_avatar/sleuthkit.discourse.group/seaturtle15/32/1366_2.png) [@seaturtle15](https://sleuthkit.discourse.group/u/seaturtle15)\
**Post date:** [May 7, 2021, 11:05pm UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/4 "2021-05-07T23:05:06Z")

</div>

Sorry not on M1, but still on Big Sur. I seem to have gotten the same error as you though, and that’s how I fixed it. Maybe you could give it a try and see if it works?

---

<div class="post-metadata">

**Author:** ![Investigator](https://avatars.discourse-cdn.com/v4/letter/i/45deac/32.png) [@Investigator](https://sleuthkit.discourse.group/u/Investigator)\
**Post date:** [May 8, 2021, 8:59am UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/5 "2021-05-08T08:59:17Z")

</div>

This is not my topic, but I was struggling with Autopsy and M1 a few months ago and haven’t got it to run yet, so all topics about M1 are interesting for me.

---

<div class="post-metadata">

**Author:** ![Investigator](https://avatars.discourse-cdn.com/v4/letter/i/45deac/32.png) [@Investigator](https://sleuthkit.discourse.group/u/Investigator)\
**Post date:** [May 14, 2021, 4:42pm UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/6 "2021-05-14T16:42:00Z")

</div>

@wildphish have you got Autopsy running yet?  
I am attempting the same as you, trying to install everything on my M1 with Big Sur, but I am running in all kind of problems, one of which is that Homebrew for arm64 uses a different prefix than for Intel, which makes things being installed in /opt/homebrew instead of /usr/local, meaning you will have to replace those lines in the tutorial everywhere you see them. But even after I did that, I received a No/No/Yes No/No Yes/Yes in the report when building the sleuthkit.

---

<div class="post-metadata">

**Author:** ![Investigator](https://avatars.discourse-cdn.com/v4/letter/i/45deac/32.png) [@Investigator](https://sleuthkit.discourse.group/u/Investigator)\
**Post date:** [May 26, 2021, 7:40am UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/7 "2021-05-26T07:40:18Z")

</div>

I finally managed to install and run the Windows-version of Autopsy on my M1 in Parallels.

---

<div class="post-metadata">

**Author:** ![goyalmanik22](https://avatars.discourse-cdn.com/v4/letter/g/fbc32d/32.png) [@goyalmanik22](https://sleuthkit.discourse.group/u/goyalmanik22)\
**Post date:** [September 20, 2021, 12:17pm UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/8 "2021-09-20T12:17:04Z")

</div>

I have the same issue. Any tips for solution?

---

<div class="post-metadata">

**Author:** ![cr\_pathologist](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@cr\_pathologist](https://sleuthkit.discourse.group/u/cr_pathologist)\
**Post date:** [January 1, 2022, 11:34am UTC](https://sleuthkit.discourse.group/t/cannot-find-java-error-bigsur-m1/2607/9 "2022-01-01T11:34:00Z")

</div>

> [@seaturtle15](#):
>
> jdkhome=“$JAVA\_HOME” in line 83 or earlier.

Many Thanks, this helped!
