I tried to install JDK 7u67 on my MacBook Pro with macOS Sierra 10.12.6, but all I get is this error message:

Java from Oracle requires Mac OS X 10.7.3 or later.

It does not really makes sense for me, because I already have higher version, so Java should be able to install. Has anyone faced same issue, please?


Similar to what @klanomath suggests:

  1. Copy the pkg off the disk image so it can be edited.
  2. Extract pkg contents in Terminal (assumes "JDK 7 Update 67.pkg" is your pkg name): pkgutil --expand JDK\ 7\ Update\ 67.pkg JDK\ 7\ Update\ 67.unpkg
  3. Edit the Distribution file with your favorite text editor.
  4. Change the return value of pm_install_check() to always be true.
    function pm_install_check() {
      return true;
  1. Save the Distribution file.
  2. Back in Terminal: pkgutil --flatten JDK\ 7\ Update\ 67.unpkg JDK\ 7\ Update\ 67.new.pkg
  3. Run/Open the new pkg file.
| improve this answer | |

The check is performed by the pm_install_check() function in the package's Distribution.

  1. Copy the pkg off the disk image so it can be edited
  2. Open it with The Archive Browser
  3. Edit the Distribution file with TextEdit (right-click on Distribution and choose Open With to edit the file in place).
  4. Remove the following lines so the function always returns true.

  5. Save the file and open the pkg.

| improve this answer | |
  • The Archive browser cannot open *.dmg file – Jakub Gruber Sep 20 '17 at 11:05
  • @Jakub You need to open the pkg with The Archive Browser, that’s why I suggest copying it off the dmg. – grg Sep 20 '17 at 11:20
  • I am trying to install java7 u67 on a 10.12.6 system and, after I modify the Distribution script as above, I see an error. In the install.log, it says: – Ray Kiddy Mar 13 '18 at 17:08
  • NSUnderlyingError = "Error Domain=BOMCopierFatalError Code=1 \"cpio read error: bad file format\" UserInfo={destinationPath=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/95987656-1AAB-4B6C-A504-17D2545380A5.activeSandbox/Scripts/com.oracle.jre.ROFBey, offset=50831541, type=BOMCopierFatalError, sourcePath=/Users/rakiddy/Java 7 Update 67.pkg, NSLocalizedFailureReason=cpio read error: bad file format}"; – Ray Kiddy Mar 13 '18 at 17:08

This is an obvious thing to happen, cause JDK 7 was made for previous versions of macOS. You need to use JDK 8 in order to successfully install it on your current macOS version. Check Here: Java SE Development Kit 8 Downloads

| improve this answer | |
  • 1
    Is there any solution to install JDK 7 anyway? We have application that is based on JDK 7 and because of its dependencies, it is not so simple to switch to JDK 8. – Jakub Gruber Sep 20 '17 at 10:00
  • 1
    Switching to JDK 8 is very easy for your application there is a JVM in your machine(not necessarily JDK-8). Android by default installs a JVM in your computer. Open a project in Android studio, Goto File -> Project Structure -> SDK location There you can see, default JDK location, if there is no such thing then, 1.install JDK-8, and Set the Environmental variables. 2.Set the jdk path in the JDK location in the android studio. – Sayan Sep 20 '17 at 10:09
  • 1
    Sorry, but I have to insist on JDK 7. – Jakub Gruber Sep 20 '17 at 10:25
  • 1
    @JakubGruber check here: pastebin.com/SvGPzaTH . This might help – Sayan Sep 20 '17 at 10:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .