sleuthkit / autopsy

Autopsy® is a digital forensics platform and graphical interface to The Sleuth Kit® and other digital forensics tools. It can be used by law enforcement, military, and corporate examiners to investigate what happened on a computer. You can even use it to recover photos from your camera's memory card.
http://www.sleuthkit.org/autopsy/
2.43k stars 594 forks source link

Java error: class file version 65.0 #7900

Open RobertoD91 opened 6 months ago

RobertoD91 commented 6 months ago

I have this error when i open autopsy on an intel macos

org.netbeans.InvalidException: StandardModule:org.sleuthkit.autopsy.core jarFile: /Users/Roberto/autopsy-install/autopsy-4.21.0/autopsy/modules/org-sleuthkit-autopsy-core.jar: java.lang.UnsupportedClassVersionError: org/sleuthkit/datamodel/TskCoreException has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0

Some system infos:

$ sw_vers 
ProductName:        macOS
ProductVersion:     14.4.1
BuildVersion:       23E224

$ brew --version
Homebrew 4.2.21-47-g9bf7734

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/

$ /usr/libexec/java_home -v 17
/usr/local/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home

$ which java
/usr/local/opt/openjdk@17/bin/java

$ java --version
openjdk 17.0.11 2024-04-16
OpenJDK Runtime Environment Homebrew (build 17.0.11+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.11+0, mixed mode, sharing)

$ ./install_application.sh -z /Users/xxxx/Downloads/autopsy-4.21.0.zip -i /Users/xxxx/autopsy-install/ -j /Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/
$ ./add_macos_jna.sh -i /Users/xxx/autopsy-install/autopsy-4.21.0/
RobertoD91 commented 6 months ago

Autopsy starts by setting jdkhome=/Library/Java/JavaVirtualMachines/openjdk/Contents/Home/ (Java 21 by brew) in /Users/Roberto/autopsy-install/autopsy-4.21.0 but the guide suggests using java 17

stangeqwq commented 6 months ago

Same confusion here. Trying to install autopsy for mac m1. Getting class error if jdkhome is set to java 21 (new). but if i set jdk home to java17, i get sleuthkit error tsk

sleuthkit 4.12.1 (w/) autopsy 4.21.0

weird that readme.md says sleuthkit 4.11 but building autopsy asks for sleuthkit 4.12 at /usr/local/share/java