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



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:


Copy the pkg off the disk image so it can be edited.
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
Edit the Distribution file with your favorite text editor.
Change the return value of pm_install_check() to always be true. 



    function pm_install_check() {
      return true;
    }



Save the Distribution file.
Back in Terminal: pkgutil --flatten  JDK\ 7\ Update\ 67.unpkg JDK\ 7\ Update\ 67.new.pkg
Run/Open the new pkg file.