Eclipse plugin development and Apple Silicon M1
So... I have upgraded recently laptop to Macbook Pro M1. I am happy with hardware as it is blazing fast, cold, just perfect.
But... I have issues with development. I am not going to mention, that my VMWare Fusion is not available on Apple Silicon and I am not able to test my eclipse plugin anymore on Windows 10, which is like... 80% of all users. Just maddness. When I decided to go with Apple Silicon I assumed, that VMWare will deliver Fusion pretty fast. I know there is beta released, but still I am not able to use it.
Recently I have encountered an issue with architecture, when I tried to run my plugin in debug mode from Eclipse IDE. Let's check what problem I have:
Eclipse RCP configuration looked like this:
VM linked is embedded JRE: /Users/User/Develop/bin/EclipseRCP.app/Contents/Eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.aarch64_17.0.2.v20220201-1208/jre/lib/libjli.dylib
Solution for mixing architecture on Eclipse Debug Mode
The reason of that issue is that eclipse is going to run in different JVM architecture than it has been built. Error log, shown, that there was used JVM SAPMachine v. 11.04 (arch x86_64) for debug mode, where Eclipse IDE and whole built was done on OpenJDK v. 17 (arch aarch64).
To fix it, it is required to use in Debug Configuration same architecture JVM as IDE built that. I have also used embedded one, but it can be any aarch64 JVM build.
Comments