Hi,
I was having the same issue. I am using a Mac M3Pro which is also on the Apple Silicone.
First, get the location of your JAVA 11 runtime. I have multiple JDKs installed and managed the installation with SDKMAN. Little installation guide for SDKMAN:
curl -s "https://get.sdkman.io" | bash
source "/Users/username/.sdkman/bin/sdkman-init.sh"
NB: SDKMAN additions are made to your .zshrc after installation. For SDKMAN to work THESE ADDITIONS NEED TO BE KEPT AT THE BOTTOM OF YOUR .ZSHRC!!
Once you found your desired java versions by running:
Run this to install your desired jdk:
sdk install java 11.0.23-amzn
You'll need to export it to your ~/.zshrc. Open up your ~/.zshrc with sudo nano ~/.zshrc and add this:
export MATLAB_JAVA=/Users/username/.sdkman/candidates/java/11.0.23-amzn
Update ~/.zshrc by running:
You can now run this command in your terminal to launch MATLAB by pointing it to your desired JDK (edit 20xx to match your MATLAB version. Mine was 2024b):
MATLAB_JAVA=$MATLAB_JAVA /Applications/MATLAB_R20xx.app/bin/matlab