Java 1.6.0_51 breaks MATLAB 2012b and below

38 views (last 30 days)
Mark on 19 Jun 2013
Answered: Wilfred on 2 Oct 2013
The Java 1.6.0_51 update released today breaks MATLAB 2012b and below. You can open the program but it does not register any mouse or keyboard interaction until the window is resized.
Is there a patch coming?
Stewart on 20 Jun 2013
As another user pointed out in that from the command line, 'matlab -nodesktop' DOES work in the mean time.
The '-nojvm' option will not allow any GUI items, but '-nodesktop' will let you create plots and use the GUI features.

Sign in to comment.

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 22 Jun 2013
Edited: Shashank Prasanna on 22 Jun 2013
This issue has been fixed.
The was an issue in the Java security updates that Apple released for Mac OS X (as mentioned above). These updates install Java 1.6.0_51 and the exact build number looks like this (ending with M4508):
Java™ SE Runtime Environment (build 1.6.0_51-b11-456-10M4508) You can check if you have installed the xM4508 versions by running any one of the following commands on the Terminal of your Mac OS X:
java -version
/usr/libexec/java_home -v 1.6 -exec java -version
If you have previously installed the xM4508 versions of the Java updates you can upgrade to the fixed xM4509 version by manually installing the following update:
Mac OS 10.7.x and 10.8.x:
Mac OS 10.6.x:
Confirm that you have the updated Java version by executing any of the above two commands. The exact build number looks like this (ending with M4509):
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-10M4509)
updates already (ending with M4508), you should receive this fix (ending with M4509) automatically through Software Update / App Store.
If you need further assistance feel free to contact Technical Support.
Denny Lie
Denny Lie on 25 Jun 2013
This solution (xM4509) works for me (Mountain Lion, Matlab R2012a). Thank you :)

Sign in to comment.

More Answers (13)

Julien Aubert
Julien Aubert on 19 Jun 2013
I found this workaround, should work until Apple/Mathworks issues a patch:
Download the Apple Java SE 2013-003 update (no longer on the Apple website but I found this link:
Then download and install Pacifist
Use Pacifist to open the Apple Java package and install using the install option of Pacifist.
Your Java SE should be downgraded to where it was prior to applying the 2013-004 patch. This worked for me, matlab is functional again.

Sign in to comment.

Ken Atwell
Ken Atwell on 22 Jun 2013
As Art noticed first, a new update to Java was posted on Friday. Run Software Update, and if that does not correct the problem, you will need to download and install the update manually:
Thanks once again for your patience; we especially appreciate everyone chipping in here with suggestions and workarounds.
Ken Atwell
Product Manager, MATLAB Platforms

John on 21 Jun 2013
Another method for OS X 10.7/10.8:
Note that this may also remove any other versions of Java installed alongside 1.6
In Terminal, copy and paste these 3 commands to remove enough of the new Java version to allow re-installation of Java 1.6.0_45:
sudo rm -rf /System/Library/Java/JavaVirtualMachines
sudo rm -rf /System/Library/Frameworks/JavaVM.framework
sudo pkgutil --forget
Then open the downloaded disk image and install JavaForOSX.pkg
You will now need to turn off automatic system updates, and refrain from installing the 2013-004 update when it gets offered again via the App Store.
Niklas Roth
Niklas Roth on 24 Jun 2013
Thanks John!! Had the same problem and your solution worked!! =D

Sign in to comment.

Ken Atwell
Ken Atwell on 20 Jun 2013
Both MathWorks and Apple are aware of the problem, and we are actively investigating. We will post updates here as we learn more. As others have reported, MATLAB versions R2012b and earlier are impacted. The only identified work-around just now is to use Time Machine or similar means to revert to the previous Java release.
Thanks for your understanding and patience.
Ken Atwell
Product Manager, MATLAB Platforms
Ken Atwell
Ken Atwell on 22 Jun 2013
The new update has been released; see my new answer elsewhere on this page.

Sign in to comment.

Shashank Prasanna
Shashank Prasanna on 19 Jun 2013
Here is the support roadmap:
On Mountain Lion (OS X 10.8) MATLAB R2012b is supported but not releases prior to that.
Shashank Prasanna
Shashank Prasanna on 22 Jun 2013
Hi Stewart, this was before the diagnosis of the issue. Please look at Ken Atwell's post for the latest information.

Sign in to comment.

Mark on 20 Jun 2013
I found a temporary workaround for OS 10.6.8 at least, and involves no installations:
Close all programs
Go to Applications / Utilities / Java Preferences
The Java Prefs app will open
In the 'General' Tab, change the order of Java SE, so that the two with the older versions are on top. The versions are in the RH column on my system. For example, my toplisted version was 1.6.0_51..., which is the latest version updated yesterday. There were also two entries for 1.6.0_24... Drag these so they are on top (64-bit first)
Close the app
Start MATLAB. Now I can type and everything is good.
  1 Comment
Stewart on 20 Jun 2013
This will only work if you have other Java's installed. On my system, it seems the update (not sure which or when) has wiped all previous versions. The older verion folders are all symlinked to the 1.6 tree, see
user@host /System/Library/Frameworks/JavaVM.framework/Versions $ ls -l
total 72
lrwxr-xr-x 1 root wheel 5 Jun 19 14:06 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Jul 20 2009 1.3.1
lrwxr-xr-x 1 root wheel 10 Jun 19 14:06 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jun 19 14:06 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jun 19 14:06 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jun 19 14:06 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jun 19 14:06 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jun 19 14:06 1.6.0 -> CurrentJDK
drwxr-xr-x 10 root wheel 340 Jun 19 14:09 A
lrwxr-xr-x 1 root wheel 1 Jun 19 14:07 Current -> A
lrwxr-xr-x 1 root wheel 59 Jun 19 14:06 CurrentJDK -> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents
I tried this option, but only the latest 1.6.0_51 is available. Manually installing a new java on OSX seems a bit hairy.

Sign in to comment.

Tobias on 20 Jun 2013
This has also happened to me, Matlab 2012a, OS X 10.7.5.

Fabs on 20 Jun 2013
I ran into this problem today. If you have a time machine backup, you can simply replace /System/Library/Java with a time machine backup from before the update. No need to install anything.
Fabs on 21 Jun 2013
Hm, it definitely worked for me. It may be a stupid question, but did you make sure you really restored the old (pre-update) folder? I believe Apple issued the update 06/19, so the folder after restoration should have a date 06/18 or older.

Sign in to comment.

Antonio on 21 Jun 2013
it is inconceivable that the apple makes available an update without first being her some of its operation. is inconceivable block the work of the people.

Art on 22 Jun 2013
Apple has released a new version of the 1.6.0_51 update, so it is no longer necessary to hack a downgrade. The fix is described here:
You have to manually download the JavaForOSX2013-0004 update. I've tried it and it restored my Matlab to working again. This was a rather nasty mix-up.

ML on 27 Jul 2013
So, how about Java 7 support on OS X sometime this century?
Why do I have to install EOL Java 6 just to install your stuff? Most developers simply fail to build for 64-bit, but you guys are 64-bit, and still not Java 7 compliant. What gives?
It's time to get JAVA itself on your Product Roadmap as well: ...which seems long overdue.

Timothy on 30 Aug 2013
Shame the Java update was not rolled out as a 'Software Update', or if it was my Pro didn't do it. I've had heartache for a couple of months almost making me buy a new Pro and Matlab V13 :-) - Damm it now works...

Wilfred on 2 Oct 2013
THANK YOU !!!!!!!


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!