[
https://issues.apache.org/jira/browse/DIRSTUDIO-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17712103#comment-17712103
]
Warren White commented on DIRSTUDIO-1293:
-----------------------------------------
This is odd. I see on my machine, M1 arm64, I am using java x86.
The amazon corretto 17 arm64 does not work for me, but x86 does.
Also, only worked from the command line.
Using this VM:
{code:java}
<string>-vm</string><string>/Users/USERNAME/Downloads/amazon-corretto-17.arm.jdk/Contents/MacOS/libjli.dylib</string>
{code}
throws this error:
{code:java}
dlopen(/Users/USERNAME/Downloads/amazon-corretto-17.arm.jdk/Contents/MacOS/libjli.dylib,
0x0002): tried:
'/Users/USERNAME/Downloads/amazon-corretto-17.arm.jdk/Contents/MacOS/libjli.dylib'
(mach-o file, but is an incompatible architecture (have 'arm64', need
'x86_64')),
'/System/Volumes/Preboot/Cryptexes/OS/Users/USERNAME/Downloads/amazon-corretto-17.arm.jdk/Contents/MacOS/libjli.dylib'
(no such file),
'/Users/USERNAME/Downloads/amazon-corretto-17.arm.jdk/Contents/MacOS/libjli.dylib'
(mach-o file, but is an incompatible architecture (have 'arm64', need
'x86_64')){code}
Setting VM to the following and running from cmdline opens ApacheStudio:
{code:java}
<string>-vm</string><string>/Users/USERNAME/Downloads/amazon-corretto-17.x86.jdk/Contents/MacOS/libjli.dylib</string>{code}
My assumption is that the *Rosetta 2 dynamic binary translation* works well
enough to execute ApacheStudio using x86.
On another note, I do not believe that ApacheStudio binary was compiled for
arm64, hence why it does not load the arm64 java library.
> Fails to start on MacOS Monterey
> --------------------------------
>
> Key: DIRSTUDIO-1293
> URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1293
> Project: Directory Studio
> Issue Type: Bug
> Components: studio-ldapbrowser
> Affects Versions: 2.0.0-M17
> Environment: Model Name: MacBook Pro
> Model Identifier: MacBookPro18,2
> Chip: Apple M1 Max
> Total Number of Cores: 10 (8 performance and 2 efficiency)
> Memory: 32 GB
> System Firmware Version: 7429.41.5
> OS Loader Version: 7429.41.5
> Reporter: Philip Peake
> Priority: Major
> Fix For: 2.0.0-M18
>
> Attachments: alert.png
>
>
> Launching Directory Studio fails with an error (see attached image),
> basically saying that the JNI_CreateJavaVM symbol is not found in
> libjvm.dylib.
> The symbol is actually there:
>
> {code:java}
> bin philip$ nm ../lib/server/libjvm.dylib | grep -i jni_create
> 00000000004e3190 T _JNI_CreateJavaVM
> {code}
>
> Tried two different java versions:
> * zulu-11.jdk
> * zulu-17.jdk
> Tried adding the path to the java version explicitly in the Info.plist file:
>
> {code:java}
> <array>
>
> <!-- to use a specific Java version (instead of the platform's default)
> uncomment one of the following options,
> or add a VM found via $/usr/libexec/java_home -V
>
> <string>-vm</string><string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java</string>
>
> <string>-vm</string><string>/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java</string>
> -->
>
> <string>-vm</string><string>/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/java</string>
> <string>-keyring</string>
> <string>~/.eclipse_keyring</string>
>
> </array>
> {code}
>
> This appears to be a problem in Eclipse/Directory Studio.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]