wicked programmer
helping developers everywhere innovate and learn
  • Home
  • Events
  • Publications
  • Learning
  • About
os x el capitan

General

How To Install JDK 7 On El Capitan (10.11)

Wicked ProgrammerJune 17, 2015

There are a number of applications on my Mac that need Java.  Some of them have to use older versions of Java.  Today I found an application that required a specific version of Java to be installed on my Mac.  The version of Java was 1.7.0_60-b19.  Ut Oh!  Yes, Ut Oh!  Java prior to version 1.7.0_67 had an issue installing on Yosemite and later.  These versions of Java treated Max OS X 10.10 or higher as as OS X 10.1.  This caused a bug where the OS version check failed and prevented you from installing Java.

Screen Shot 2015-06-17 at 3.34.34 PM

There are two ways to fix this problem that I know.  The first way is to modify the /System/Library/CoreServices/SystemVersion.plist file to spoof the version of OS X to 10.9.  Once modified you can then install Java.  Just remember to modify it back before you restart because you will be in a world of trouble.  Unfortunately this trick did not work on El Capitan.  The second way is to modify the Java package.  This is safer since you are not modifying system files.  Here are the steps.

  • Download JDK 7 Update 60 for Mac OS X
  • Open the .dmg file.
  • Expand the package file

   pkgutil –expand “/Volumes/JDK 7 Update 60/JDK 7 Update 60.pkg” “/tmp/JDK 7 Update 60.unpkg”

  • Open the Distribution file using TextEdit.

   open –a TextEdit Distribution

  • Find the function pm_install_check() and make sure it always returns true.
  • Take the expanded package files and repackage them.

   pkgutil –flatten “/tmp/JDK 7 Update 60.unpkg” “/tmp/JDK 7 Update 60.pkg”

  • Install using the new package.

   open “/tmp/JDK 7 Update 60.pkg”

The installer will run and skip the OS version check.  You should be able to install without any problems.

Related Posts

Count Coding Example-min

General /

Quality Issue #1 – Count vs. Count()

bitarray-min

General /

Introducing BitArray serialization for Newtonsoft.Json and System.Text.Json

General /

Introducing FastSearch, a very fast string search for objects and lookups

‹ Getting Started with Docker [on Mac OS X]› Inspiration for Success







Back to Top

© wicked programmer 2023