How to install JDK 1.7 (JDK 1.8) under Mac x yosemide (10.10)

Source: Internet
Author: User

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:

    1. function Pm_install_check() {
    2. return true;
    3. }

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.