Cannot install JDK 7 on macOS Sierra 10.12.6
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.