简体   繁体   中英

Switching the java version in MATLAB on OS X 10.8

I have already set my MATLAB_JAVA variable as explained here and my system says java version 1.7.0_25 when I type java -version however, when I go to MATLAB and type version -java it says Java 1.6.0_51-b11-457-11M4509 with Apple Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode . How do I get it so that it sees Java 1.7 in Mountain Lion 10.8?

This problem is fixed with newer releases of Matlab. R2013a, which it looks like you were running, was stuck with the Apple-distributed 1.6 JVM on OS X. Starting with R2013b, Matlab on OS X ships with a bundled JVM like it does on other platforms, and MATLAB_JAVA works now. And the bundled JVM is 1.7. So this issue can be fixed by upgrading to R2013b or later.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM