Installation failed on MacOS on MacBook Air M1

I followed the installation instructions on GitHub for installing HiveMQ CE on MacOS but it failed during the build (initiated with ./gradlew clean hivemqZip) with the error:

An exception occurred applying plugin request [id: ‘de.thetaphi.forbiddenapis’, version: ‘3.3’]

Failed to apply plugin ‘de.thetaphi.forbiddenapis’.
Could not create plugin of type ‘ForbiddenApisPlugin’.
BUG! exception in phase ‘semantic analysis’ in source unit ‘jar:file:/private/var/root/.gradle/caches/jars-9/f12a27dc83d5544d17b21263537959e0/forbiddenapis-3.3.jar!/de/thetaphi/forbiddenapis/gradle/plugin-init.groovy’ Unsupported class file major version 64

Any ideas? Thanks

Hello @s309 ,

Welcome to the HiveMQ Community!

Could you please confirm the Java SDK version that is being used with this build attempt?

Typically, when a plugin failure occurs like this, it is due to a Java SDK version difference between the project being built and the Java SDK selected for Gradle. Specifically, Unsupported class file major version 64 typically indicates that a Java SDK version of 20 or higher is needed.

After confirming the Java SDK version is 20 or higher, please confirm if there are any further failures when attempting to build, and we will be happy to assist!

Aaron from the HiveMQ Team

Thanks for the prompt reply. I installed JDK latest version from just now. java --version says " java 20.0.1 2023-04-18

Java™ SE Runtime Environment (build 20.0.1+9-29)

Java HotSpot™ 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)"

Installation won’t proceed beyond the step that caused the fatal error.

I ran using sudo…

Hello @s309 ,

To confirm, are you looking to build the project from scratch, or are you looking to deploy a Community Edition broker? If you are looking to deploy the broker, it is not necessary to build the broker project first, and instead a built version can be obtained and installed from the binary package installation provided on the GitHub, linked here. This can then be launched using the file located in the Bin directory of the unzipped file.

If you are looking to build, be sure that this JDK version is also specified for the build tool in use - specfically, it looks like you are using Gradle here. Gradle can be configured to use different versions of the JDK if multiple are installed on a system at any one time. This can be changed in different ways, depending on how the project is being built - whether via command line or through an IDE.

Aaron from the HiveMQ Team