Home > Java, Mac administration, Mac OS X, MATLAB > MATLAB problems after Java for Mac OS X 10.6 Update 16 or Java for OS X 2013-004 are installed

MATLAB problems after Java for Mac OS X 10.6 Update 16 or Java for OS X 2013-004 are installed

After the latest round of Apple’s Java updates, some Java-based applications began exhibiting problems. At my shop, MATLAB was one of the applications that was affected by this.

The root cause was discussed and identified in this StackOverflow thread and appears to affect Swing applications, including MATLAB.

Symptoms

After applying Apple’s Java For Mac OSX 10.6. Update 16 to a 10.6.x Mac, or Java for OS X 2013-004 to a 10.7.x – 10.8.x Mac, MATLAB 2012b and below stops functioning correctly. You can open the program but it does not register any mouse or keyboard interaction until the window is resized.

Status as of Friday, June 21

After speaking with Mathworks support, I tested and verified the following:

MATLAB R2011a runs in Mac OS X 10.6.8, 10.7.5 and 10.8.4 with the latest Apple Java updates installed.

MATLAB R2013a runs in Mac OS X 10.7.5 and 10.8.4 with the latest Apple Java updates installed. MATLAB R2013a does not support 10.6.8.

At the moment, here are the options that appear to be available:

For 10.6.x: MATLAB users should install and use MATLAB R2011a

For 10.7.x – 10.8.x: MATLAB users should upgrade to MATLAB R2013a if possible. If not possible to upgrade to 2013a for code compatibility reasons, MATLAB users should install and use MATLAB R2011a.

Other options may include trying to roll back Java to the previous version, but that can cause other issues. I don’t recommend trying that unless neither MATLAB R2013a or MATLAB R2011a are viable options.

Update – Friday, June 21 at 5:15 PM EDT

It looks like Apple has resolved this issue by posting new versions of the Java For Mac OSX 10.6. Update 16 and Java for OS X 2013-004 installers:

Java for OS X 2013-004http://support.apple.com/kb/DL1572
Java for Mac OS X 10.6 Update 16http://support.apple.com/kb/DL1573

I’ve tested the newly rev’d Java for Mac OS X 10.6 Update 16 update on 10.6.8 and MATLAB R2012b. The new update allowed MATLAB R2012b to run normally again. I still need to test 10.7.5 and 10.8.4, but this looks promising.

Screen Shot 2013-06-21 at 4.17.02 PM

Update – Friday, June 21 at 9:40 PM EDT

I’ve now tested the new revision of the Java for OS X 2013-004 update on Mac OS X 10.7.5 and 10.8.4, both times with MATLAB R2012b. The new update allowed MATLAB R2012b to run normally again on both OSs.

Screen Shot 2013-06-21 at 9.27.08 PM

Screen Shot 2013-06-21 at 9.35.06 PM

  1. June 21, 2013 at 8:01 pm

    This issue has been resolved by Apple:
    (10.7, 10.8+)
    (10.6-only)

  2. June 21, 2013 at 8:01 pm

    …apparently the links got stripped out. Download the latest manual Java update package from Apple.

  3. June 21, 2013 at 10:15 pm

    This might be of interest if you want a simple way to force an update, which is only possible for the JavaForOSX updates (i.e. 10.7 and 10.8):

    One condition in the update’s .dist file is the environment variable JAVA_INSTALL_ON_DEMAND, which is ostensibly used for the “install Java on demand” feature available in the OS X GUI since Lion.

    So, you could force an update by setting this environment variable alongside a softwareupdate invocation (as root), wherein JavaForOSX is given as the only update to install:

    JAVA_INSTALL_ON_DEMAND=1 softwareupdate -i JavaForOSX-1.0

  4. xiaofang
    June 21, 2013 at 11:11 pm

    I installed the Java for Mac OS X 10.6 Update 16 and Matlab still can’t work normally. 😦

    • June 21, 2013 at 11:20 pm

      We’ve noticed some customers have had problems with upstream ISP caching. If you wait a few hours and re-download the manual, you should get the right bits. You can confirm which version you have by invoking:
      /usr/libexec/java_home -v 1.6 -exec java -version
      Make sure that the end of the version string ends in *M4509, not *M4508.

  5. June 22, 2013 at 12:05 pm

    Don’t we just love Java!

    It once took me days to resolve a problem with R and Java.

  6. orlando
    June 23, 2013 at 11:50 am

    The update works for 10.6.8 – on both 2012a and 2010a. Thanks for the tip!

  7. June 24, 2013 at 8:38 pm

    Dang…I just wasted 12 minutes and 30 seconds updating both of our packages. 😉

    Don

  8. Peter McLarnan
    June 29, 2013 at 9:30 pm

    Wonderful, thank you. I could still use matlab -nodesktop in a terminal, but I was considering trying to downgrade the Java update, as I suspected it was the cause. It’s baffling that they didn’t make it a new version so Software Update would pick it up.

  9. Vill
    August 25, 2013 at 7:16 pm

    Thank you for posting! I almost crashed my matlab

  10. November 26, 2014 at 9:28 pm

    We are running into an issue with not distributing Java 6, but Oracle Java like Java 8 Update 25. When we launch MATLAB R2103a it displays a prompt:

    To open “MATLAB”, you need a Java SE 6 runtime. Would you like to install one now.

    We are going to try installing the latest MATLAB available for OS X after we upgrade our license server and see if the update helps resolve the issue, but I was curious if anybody had tips on getting MATLAB to work with Oracle vs Apple Java’s.

  1. No trackbacks yet.

Leave a comment