How to install JDK on Mac and JDK on Mac
1. Visit the Oracle official website http://www.oracle.com, browse to the home page at the bottom of the menu, and then follow the prompts to operate:
2. Click the jdk download button:
3. Select "Accept Lisence Agreement" to agree to the Agreement:
4. Click the download link after Mac OS X x64:
After the download is complete, click the installation package and follow the prompts to complete the installation.
5. Open the Finder and find the installed jdk 1.8.0 _ 40.jdkin the path shown below:
6. The Home folder under Contents is the root directory of the JDK.
Where:
The bin directory stores some terminal command tools used by JDK for development. Common tools such as "javac" are used to compile java source files into class files (self-decoding files). The "java" command is used to run class files. The db directory is an open source relational database developed by java; The include directory contains some header files of C language; the JDK directory under the jre directory depends on the java runtime; the lib directory stores the library files that JDK development tools depend on. The man directory stores the instructions for JDK development tools.
7. After JDK is installed, You need to configure the JDK environment variables. For details, refer to: how to configure environment variables in Mac.