Java environment configuration on Mac OS X

Source: Internet
Author: User

Java environment configuration on Mac OS X

Recently I changed my work. I used to do C/C ++, but now my company's main product is Java development. To maintain code in the future, now, I will take the time to learn Java-related content.

Before learning, we need to build a development environment for various platforms. The operating system I choose is the latest OS X EI Capitan of MacBook. Of course, as a beginner, I do not plan to use any advanced IDE, but only configure JDK, and then use the terminal to compile and run the code.

Step 2: Check whether Java development kit has been installed. The method is simple. You only need to open the terminal and enter the "java-version" command. If it is not installed, the output is shown in.

If your system has already installed JDK, you can see the corresponding version. Otherwise, you need to perform the following installation operations.

Step 2: download the latest JDK installation package from the Oracle website:

Http://www.oracle.com/technetwork/java/javase/downloads/index.html

Click the two icons shown on the page to go To the download page. Then, first you need to agree to the Oracle Java license agreement, and then select the corresponding platform installation package from the download list. here we need to select the corresponding link for Mac OS X for a long time.

The next step is to wait for the download to complete.

Step 2: install the software. The installation of software packages in dmg format in OS X is relatively simple. You only need to double-click the corresponding software package, and the software package will be automatically decompressed. After the installation is completed, the installation interface of the software package will pop up and follow the prompts to perform the operation.

Step 2: Configure environment variables. After the software is installed, it cannot be used immediately, because the corresponding program cannot be found by directly hitting the terminal, and the complete path of the program must be added.

Note: If you install the latest version, such as the version used in this article, you have configured the environment variables during the installation process, so step 1 can be omitted.

This article permanently updates the link address:

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.