Install configuration JDK under Mac

Source: Internet
Author: User

JDK Website: http://www.oracle.com/technetwork/java/javase/downloads/index.html

1. Mac comes with JDK6, installed in directory:/system/library/java/javavirtualmachines/1.6.0.jdk/.
* Jdk7,jdk8 will need to download and install the corresponding version on the Oracle website. The default path for your own JDK installation is:/LIBRARY/JAVA/JAVAVIRTUALMACHINES/JDK1.7.0_71.JDK

2. Configuring the Java_home Path

Input in Terminal: Vim ~/.BASHRC

Enter edit mode: I

Configuring the JDK Path: Export java_home=/library/java/javavirtualmachines/jdk1.7.0_71.jdk/contents/home

3. Detect if configuration is successful

Java-version

The following information is displayed:

Java Version "1.7.0_71"

Java (TM) SE Runtime Environment (build 1.7.0_71-b14)

Java HotSpot (TM) 64-bit Server VM (build 24.71-b01, Mixed mode)

PS: Jenv can also be used to install the JDK, specific reference Jenv.io

Install configuration JDK under Mac

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.