Apache Directory Studio on Apple M1 Silicon

Viewed 3200

I have a problem run Apache Directory Studio On Apple silicon MBP M1 Max.

Error:

2021-12-03 12:42:07.497 ApacheDirectoryStudio[5675:42763] Error loading /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/MacOS/libjli.dylib: dlopen(/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/MacOS/libjli.dylib, 0x0109): tried: '/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libjli.dylib' (no such file)

Looks like home brew has ApacheDirectoryStudio "x86_64" version, but Java is 'arm64'.

Please help.

4 Answers

I was able to run ApacheDirectoryStudio by installing Java for x86_64. Rosetta 2 is required to make this work on the aarch64 (Apple M1) architecture.

To install the x86_64 version of the Java JDK via Homebrew, following command can be used:

arch -x86_64 brew install oracle-jdk

Versions used:

  • ApacheDirectoryStudio: 2.0.0.v20210717-M17
  • Oracle JDK: 17.0.2

There doesn't seem to be a current version which works. However, you can get a working version by installing the new M1 version of Eclipse available here:

https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2021-12/R/eclipse-java-2021-12-R-macosx-cocoa-aarch64.dmg]

Then, at the bottom of the Apache Directory Studio download page is a link with instructions on how to load the directory studio plugin into Eclipse. This works fine. (I am using Java 17, but it should work with any java version from 11 upwards as far as I can see).

The latest version of Apache Directory Studio needs Java 11 at a minimum. But even that won't help you on M1, Eclipse won't run, with the old problem of "missing symbol" - which is actually there.

Eclipse has had this problem on and off for years, on all platforms.

The architecture of Java doesn't matter. The Intel version runs fine with Rosetta2. Remember, Java is architecture independent. It the JVM runs, the java application runs.

You may want to encourage them by commenting on my bug report:

https://issues.apache.org/jira/projects/DIRSTUDIO/issues/DIRSTUDIO-1293

There is an RC release of Eclipse for the M1. No clue how long it will take the Apache Directory Studio team to pick it up.

Related