Cannot find java error - bigsur M1

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 to install.

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.

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

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?

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.

@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.

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

I have the same issue. Any tips for solution?