Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Directory Studio on Apple M1 Silicon

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 Homebrew has ApacheDirectoryStudio x86_64 version, but Java is arm64.

Please help.

like image 854
Andrii Petrenko Avatar asked Sep 13 '25 05:09

Andrii Petrenko


2 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
like image 53
Martin M. Avatar answered Sep 15 '25 19:09

Martin M.


I built it from source. Here are the steps I did:

$ brew tap homebrew/cask-versions
$ brew install --cask temurin17
$ brew install maven
$ git clone https://github.com/apache/directory-studio.git
$ cd directory-studio
$ JAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home ./build.sh

Then you can find the built ApacheDirectoryStudio.app application in the product/target/products/org.apache.directory.studio.product/macosx/cocoa/aarch64 subdirectory.

like image 34
Tamerz Avatar answered Sep 15 '25 18:09

Tamerz