2. Click on the "JDK DOWNLOAD" button:
3. Select "Accept lisence Agreement" agreement:
4. Click the download link after Mac OS X x64:
After the download is complete, click on the installation package and follow the prompts to complete the installation.
5. Open the Finder to find the installed JDK 1.8.0_40.jdk in the path shown:
6. The home folder under Contents, which is the root directory of the JDK.
which
The Bin directory contains some of the terminal command tools that the JDK uses for development. Common tools such as:The role of "Javac" is to compile the Java source file into a class file (i.e., a self-decoding file), and the "Java" command is to run the class file.The DB directory is an open source relational database developed by Java; The include directory is the header file for some C languages; Java Runtime on which the JDK depends on the JRE directory; Some library files that are dependent on the JDK development tools are stored in the Lib directory; the documentation for the JDK development tool in the Man directory.
Then enter "Java-version", if you see a JDK version of 1.8, the configuration has taken effect:
In the state of the English input method, press the keyboard "Ctrl + space" combination key, call up Spotlight Search, here you can quickly start the terminal, enter ter, and then enter, you can open the terminal:
2. If you are configuring an environment variable for the first time, you can use "touch. Bash_profile" To create a hidden configuration file for. Bash_profile (Use the "open-e. Bash_profile" command If you are editing a profile that already exists):
3. Enter "OPEN-E. Bash_profile" command:
4. Enter the following configuration:
Java_home=/library/java/javavirtualmachines/jdk1.8.0_40.jdk/contents/home
Path= $JAVA _home/bin: $PATH:.
Classpath= $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar:.
Export Java_home
Export PATH
Export CLASSPATH
Then save to close the window.
5. Use "source. Bash_profile" To make the configuration effective
6. Enter echo $JAVA _home to display the path you just configured
Mac install eclipse