Friday, August 29, 2014

Installing JDK 7 on Mac OS X Yosemite 10.10 developer previews

Oracle's JDK 7 installer for the Mac somehow thinks that OS X Yosemite's 10.10 version number is an unsupported version. There's a simple trick to fool the installer by giving it a version number that it expects. Open a Terminal window and edit the file /System/Library/CoreServices/SystemVersion.plist as root/Administrator. If you are familiar with vi, simply run sudo vi /System/Library/CoreServices/SystemVersion.plist. The file should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>ProductBuildVersion</key>
     <string>14A329f</string>
     <key>ProductCopyright</key>
     <string>1983-2014 Apple Inc.</string>
     <key>ProductName</key>
     <string>Mac OS X</string>
     <key>ProductUserVisibleVersion</key>
     <string>10.10</string>
     <key>ProductVersion</key>
     <string>10.10</string>
</dict>
</plist>

Edit the ProductVersion to read 10.9 and save the file. Now download the JDK 7 installer and run it. It should no longer complain about the OS X version. Be sure to restore the ProductVersion to 10.10 once the installer completes.

No comments: