Java development environment diagram under MAC OS X

Source: Internet
Author: User

This blog describes how to build a Java development environment under the Mac OSX system, with Java development environment, we can do Java related development, Eclipse and Android studio to have a JVM environment to run, so this article will briefly summarize how the Mac OSX configures the Java environment variables.

First to see the author's computer Configuration:

Open the terminal to see what shell commands are used by the 10.10 version of the system:

The output is bash, which indicates that the Bourne shell is the default UNIX shell command.

See the author's Java version from the command line below:

If your system already has a successful JDK installed, you can see the corresponding JDK version via java-version.

If your computer does not have a JDK installed, you can download the JDK on the Oracle website.

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

I downloaded the 1.7 version, currently the latest JDK version is 1.8.

Configuring Java Environment variables

Input sudo vim etc/profile

Edit Profile with VI

Type I, enter insert mode

At the end of the file, add the Java path

Java_home= "/library/java/javavirtualmachines/jdk1.7.0_75.jdk/contents/home/"
Class_path= "$JAVA _home/lib"
Path= ".; $PATH: $JAVA _home/bin "

When you are finished adding, press ESC to exit Insert mode and type wq! to save the exit file.

In this step, we have configured the global Java path and CLASSPATH environment variables.

In the future, Java development will be good.

Java development environment diagram under MAC OS X

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.