MATLAB: How to upgrade the JVM from 1.5.0_13 to 1.6 that MATLAB 7.6 (R2008a) uses on the 64-bit Intel Mac running Leopard 10.5.x

changejremacMATLABmatlab_java

I recently downloaded the JVM 1.6 upgrade from Apple and I would like MATLAB to default to this JVM instead of using 1.5.0_13. I tried setting the JAVA_JVM_VERSION environment variable but MATLAB still uses JVM 1.5.0_13, as confirmed by the output of the following command
version –java

Best Answer

MATLAB uses the Operating System's JVM on the Mac platform. The recent Java 1.6 upgrade from Apple is for Intel 64-bit Macs only. MATLAB 7.6 (R2008a) for Mac OS X was an Intel 32-bit (maci) application, so it could not use Java 1.6 even if it were set as default because 32-bit applications continue to use Java 1.5.
Setting the environment variable, JAVA_JVM_VERSION to 1.6 allows MATLAB 7.8 (2009a BETA) which is a 64-bit version of MATLAB to use the 1.6 version of Java.