mac-Configuring environment variables under your own account

Source: Internet
Author: User

New people asked how to configure the Java environment variable under Mac, here is a way to create an environment variable under your own account

First: Open the terminal, execute the command CD ~, this will jump to the current account, after jumping to see if there is a. bash_profile file, execute command ls-a,

If there is a direct open, with Vim or Mac comes with the open can, if not a new one, execute the command touch. Bash_profile, after creation, use the open. Bash_profile command, enter export Java_home =/ Library/java/home Export PATH = java_home/bin: $PATH, where this /library/java/home directory is Java's JDK directory, different computers may be different, You need to modify it yourself.


Summarize the process:

1.CD ~ Jump to current personal account

2. Executive Ls-a

3. See if there is a. Bash_profile, there is execution 5, no execution 4

4.touch. bash_profile New. bash_profile File

5.open. Bash_profile Open File

6. Configure Java_home export java_home =/library/java/home

7. Last added to path in export PATH = Java_home/bin: $PATH


mac-Configuring environment variables under your own account

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.