Running Matlab R2024a in conjunction with Oracle JRE 8 Java ( native Apple Silicon version)
42 次查看(过去 30 天)
显示 更早的评论
I just upgraded to Matlab R2024a and also installed Java amazon-corretto-11.jdk as part of the installation.
I am using a 3rd party software which interacts with Matlab through Java which now causes issues due to the use of Corretto. I was recommended to switch to Oracle JRE 8 to solve the problem.
Is anybody here successfully running Matlab R2024a for native Apple M1 chip in conjunction with Oracle JRE 8?
On the Oracle download ( https://www.oracle.com/au/java/technologies/downloads/ ) page there are several options for Java 8. I used the ARM64 DMG installer which then shows the following version on my mac:
1.8.0_411 (arm64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home
I also created a java.opts file with the following content:
-Djava.home=/Library/Java/JavaVirtualMachines/jdk-1.8.jdk/Contents/Home
and stored it in /Applications/MATLAB_R2024a.app/bin/maca64/
Now Matlab R2024a is not starting up any more.
Does anybody have any recommendations?
0 个评论
回答(1 个)
Alan
2024-7-5
Hi Damian,
MATLAB R2024a in MAC comes with amazon-coretto-8.jdk by default. But it is possible to change the Java version to amazon-coretto-11.jdk, since OpenJDK 11 is listed as one of the compatible Java versions for MATLAB R2024a as mentioned here: https://www.mathworks.com/support/requirements/openjdk.html
It could be possible that you have not properly configured your MATLAB to run the new Java version. To set R2024a to work with amazon-coretto-11, execute the “jenv” function with the new Java home path as follows:
jenv("/Library/Java/JavaVirtualMachines/amazon-coretto-11.jdk/Contents/Home/")
Modify the path string in the above function call if you have installed Java in another directory. After running “jenv”, restart MATLAB to complete the configuration. To confirm the new java version, execute “jenv” in the MATLAB command line.
Regards.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!