Open stkgo opened 2 years ago
I'm encountering this same issue when building with Adoptium's Temurin 8 OpenJDK distribution.
I had a similar error on m1, with three versions of java, but not jdk8. To resolve:
brew tap homebrew/cask-versions
brew install --cask temurin8
JAVA_INSTALL_DIR=/Library/Java/JavaVirtualMachines/temurin-8.jdk
JAVA_BIN_DIR=${JAVA_INSTALL_DIR}/Contents/Home/bin
JAVA_VSN=$(${JAVA_BIN_DIR}/java -version 2>&1|head -1|tr -d '"'|awk '{ print $3 }')
export JAVA_HOME=$(/usr/libexec/java_home -v ${JAVA_VSN})
make build
make run
You should use jdk11 or later (up to 17). Best way to install Java is https://sdkman.io/
Thanks @pditommaso. The README in this repo states Java 8 as a requirement, but I guess it's just a minimum requirement, which is great, but perhaps this could be stated explicitly.
The critical config, as one would expect, seems to be the use of the same jdk for build
and run
steps. Personally, for dubious reasons, I did not have JAVA_HOME
set at build time, and my default configs led to the error.
My mistake, Java 8 should work
I'm running on an M1 Mac with Zulu's jdk8 release. I can run
make build
and it completes without errors, however when I runmake run
I get see the following:Running
which java
correctly identifieszulu8.60.0.21-ca-jdk8.0.322-macosx_aarch64/bin/java
andjava -version
shows:Is there any guidance on how to run Tower on an M1 Mac?