Installation configuration of Java EE environment < one > JDK in Mac OS system

Source: Internet
Author: User

This article describes how to build our Java EE work environment under Mac, which is quite easy for beginners to understand.

I. Installation and configuration of JDK 1, first we go to the Oracle website JDK

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

2. Next, double-click to install the DMG

A series of next click on the line

3. You can find the JDK installation path in the Finder.

Open Finder to find Macintosh HD This is our hard drive

Some students may not find the Macintosh HD

Open Finder Preferences settings Sidebar tick the button on the hard drive so that the MACINTOSHHD appears in the Finder's sidebar.

  

The path is: Macintosh hd--Resource Library--java--javavirtualmachines--jdk1.***

As shown, we found the installation path of our JDK here I installed the version 7 and 8, because it involves a number of projects need so loaded two.

Here are some of the JDK's directory structures:

  

4, the JDK configuration environment

Next is the JDK's environment configuration

Turn on your Mac's terminal

Input

Touch. Bash_profile

VI. bash_profile

  

Configuration

java_home=/library/java/javavirtualmachines/jdk1.8.0_101.jdk/contents/home

Path= $JAVA _home/bin: $M 2_home/bin: $PATH:.

Classpath= $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar:.

Export Java_home

Export PATH

Export CLASSPATH

Color-coded places need to be replaced with the JDK version you installed other basic unchanged

  

Enter after input: Enter command mode input Wq save Exit VI Editor

  

then enter the source. Bash_profile Update configuration on the terminal

Test whether the installation configuration was successful

Input Java-version

  

A successful version number is configured successfully.

Installation configuration of Java EE environment < one > JDK in Mac OS system

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.