Java 1.6.0_51 breaks MATLAB 2012b and below

10 views (last 30 days)
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?
  3 Comments
Mark
Mark on 19 Jun 2013
It may be the Java for OS X 2013-004 update released today that is now bundled with 10.8.4
Stewart
Stewart on 20 Jun 2013
As another user pointed out in http://www.mathworks.com/matlabcentral/answers/79691-java-1-6-0_51-breaks-matlab-2012b-on-mac-os-x-10-6-8 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
OR
/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.
Regards
  3 Comments
Andi
Andi on 24 Jun 2013
Does this solution also fix the problem with matlabpool (R2011a, OSX 10.6.8). I tried an older workaround which worked after a previous Java update but does not work for this one. Many thanks!
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: http://apple-java-for-mac.en.softonic.com/mac/download)
Then download and install Pacifist http://www.charlessoft.com
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.
J
  8 Comments
Luis
Luis on 21 Jun 2013
Also worked for me. Also running 2012a on 10.7.5. Thank you.

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
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 com.apple.pkg.JavaForMacOSX107
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.
  6 Comments
John
John on 21 Jun 2013
Edited: John on 21 Jun 2013
Sorry, I didn't have time to find a new 10.8 machine to test. It appears that a 10.8 machine upgraded from 10.7 (that already had Java 1.6 installed) does not use the 10.8 package identifier. So there are 3 packages available depending on which OS you have and/or how it was upgraded:
com.apple.pkg.JavaForMacOSX10.6
com.apple.pkg.JavaForMacOSX107
com.apple.pkg.JavaForMacOSX108
To find which is installed on your machine, use the following terminal command:
pkgutil --pkgs=.*Java.*
Substitute the appropriate package version into the 'forget' command.
If you need to find out when a package was installed, use the following:
pkgutil --pkg-info com.apple.pkg.JavaForMacOSX10.6 | grep "install"
Convert from Unix seconds to local time using:
date -j -f "%s" [insert time in seconds]
For 10.6.8, you will need to find a copy of 'Java for Mac OS X 10.6 Update 15'. This is no longer available from Apple, and I cannot recommend any sites, although you can find it if you look hard! Always check downloads from non-Apple sites for security by checking the SHA1 value of the downloaded file. See http://support.apple.com/kb/ht1652 for how to do that. SHA1 values for the two files required can be found by looking in the Wayback Machine:
Java for Mac OS X 10.6 Update 15:
Java for OS X 2013-003 (for OS X 10.7 & 8)
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
  4 Comments
Malcolm Lidierth
Malcolm Lidierth on 21 Jun 2013
@Ken I have a Mac Pro updated to Mountain Lion from Snow Leopard with JDK 7 installed. Just replacing the copy of the JDK6 in the /System/Library/Java/JavaVirtualMachines solved the problem for me.
If Apple or TMW could provide a copy of that it could prove a quick fix for some users - there may be copies on the web as suggested by other posters but one of reliable provenance would be better.
MATLABers might also check in /Library/Java/JavaVirtualMachines - they may have a copy there.
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.
  5 Comments
Stewart
Stewart on 20 Jun 2013
This does not answer the question. According to the roadmap, there is 2-year support for 10.6 still in effect. Saying that R2012b is not supported on releases prior to 10.6 contradicts the roadmap.
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
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
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
Tobias on 20 Jun 2013
This has also happened to me, Matlab 2012a, OS X 10.7.5.

Fabs
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. https://discussions.apple.com/message/22294042#22294042
  2 Comments
Mario
Mario on 20 Jun 2013
Hi,
I have the same problem.
I did the TM restoration, but it doesn't seems to work for me. Is there any way to get rid of the 004 update and instal the 003?, I do have the JavaForOSX2013-003.dmg http://tinyurl.com/mr2fakx
Thanks.
—MATLAB R2012a—OS X 10.8.4—Xcode 4.6.3—Java 004—
Fabs
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
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
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: http://lists.apple.com/archives/java-dev/2013/Jun/msg00055.html
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
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: http://www.mathworks.com/support/sysreq/roadmap.html ...which seems long overdue.

Timothy
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
Wilfred on 2 Oct 2013
THANK YOU !!!!!!!

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!