javaapple-m1apple-silicon

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.


Solution

  • 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: