How to set environment variables to an application on OSX Mountain Lion?

前端 未结 4 2013
南旧
南旧 2020-12-03 00:13

since the upgrade to OSX Mountain Lion I‘ve got some problems with setting the environment variables for eclipse and maven.

My goal is to run a maven command in Ecli

4条回答
  •  醉酒成梦
    2020-12-03 00:50

    Steps of commands on terminal window:

    1. vi ~/.bash_profile
    2. Press i (to bring the vi editor in edit mode)
    3. Enter the environment variable in the vi editor window
      • e.g. export JAVA_HOME=/Users/Shared/Jenkins/Home/tools/hudson.model.JDK/java8
    4. esc key followed by :wq
    5. source ~/.bash_profile

提交回复
热议问题