Configure homebrew and Java home under Mac

Source: Internet
Author: User

1.terminal Input /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" for installation

2. The output content is successful

3. Verify that the input brew has no help information if command not found indicates that the environment variable is not configured

4. WORKAROUND: Terminal inputsudo vim. Bash_profileAnd then continueexport PATH=/usr/local/bin:$PATH And then continuesource. Bash_profileThen continue to enter brew with help information

"Other" Mac configuration Java_home

1. First determine if the JDK installation was successful java-version

2.terminal input sudo vim/etc/profile

3.

Press I to display insert to enter the input mode.

(Note: The path of the java_home can be obtained in the terminal input/usr/libexec/java_home)

Enter the following configuration:

Java_home= "/library/java/javavirtualmachines/jdk1.8.0_131.jdk/contents/home"

Export Java_home

Class_path= "$JAVA _home/lib"

Path= ". $PATH: $JAVA _home/bin"

Press ESC to go to save

Input: wq! Save

4. Input input source/etc/profile can be effective

5. Verify input input echo $JAVA _home eject ... xxjdk/contents/home

Configure homebrew and Java home under Mac

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.