The following error message pops up when we want to update the JDK to 1.7 (1.8) in the Mac x Yosemide system
The solution to this problem is as follows:
1. Download good JDK 1.7 (1.8) Address: http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Open the downloaded DMG. The following interface appears
Right click on copy JDK7 update 60.pkg, then save to any directory, and rename JDK7 Update 60.pkg to jdk7.pkg (here also can not rename, here to rename only to remove the space in the name)
3. Run:
Pkgutil–expand jdk7.pkg where the path/jdk7.pkg/tmp/jdk8.unpkg
4. Open the/tmp/jdk8.unpkg directory, locate the distribution file in the directory, and use Vim or an editor to open it.
5. Find the Pm_install_check inside the function.
function Pm_install_check() {
If(! ( checkformacosx(' 10.7.3 ') = = true)) {
My. Result. Title = ' OS X Lion required ';
My. Result. Message = ' This Installer are supported only on OS X 10.7.3 or later. ' ;
My. Result. Type = ' Fatal ';
Return false;
}
Return true;
}
You will find that he is here to determine whether your system is 10.7.3 after, because now Yosemide is not the official version, so here will check however.
Modified to:
- function Pm_install_check() {
- return true;
- }
Save.
6. Then we re-pack. The command is as follows:
pkgutil–flatten/tmp/jdk8.unpkg//tmp/jdk8.pkg
7. Open the/tmp/jdk8.pkg file and you will find that it can be installed properly.
How to install JDK 1.7 (JDK 1.8) under Mac x yosemide (10.10)