How do I specify a version of the JDK on Mac OS x that is specified when eclipse starts?

Source: Internet
Author: User
Tags java se

Edit $ECLIPSE _home/Eclipse. app/contents/MacOs/eclipse.ini file, right or CTRL + click on the eclipse application in the Finder, then click "Show Package Contents" and go to directory contents/macos/to find
by ls-ltr/library/Java/javaVirtualmachines/lists the installed individualJDK versionpath, and then specify it in the Eclipse.ini file, for example:
-VM
/library/java/javavirtualmachines/jdk1.8.0_25.jdk/contents/home/bin/java

the system default is
/system/library/frameworks/javavm.framework/versions/current/commands/java

at the same time, you can see all the java_home points by executing/usr/libexec/java_home-v, for example:
Matching Java Virtual Machines (5):
1.8.0_25, x86_64: "Java SE 8"/library/java/javavirtualmachines/jdk1.8.0_25.jdk/contents/home
1.8.0_20, x86_64: "Java SE 8"/library/java/javavirtualmachines/jdk1.8.0_20.jdk/contents/home
1.7.0_71, x86_64: "Java SE 7"/library/java/javavirtualmachines/jdk1.7.0_71.jdk/contents/home
1.6.0_65-b14-466.1, x86_64: "Java SE 6"/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home
1.6.0_65-b14-466.1, i386: "Java SE 6"/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home

/library/java/javavirtualmachines/jdk1.8.0_25.jdk/contents/home

ls-ltr/usr/libexec/java_home displaying file information

How do I specify a version of the JDK on Mac OS x that is specified when eclipse starts?

Related Article

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.