mac 下设置jdk 路径,设置hadoop 路径

1、 touch ~/.bash_profile  创建一个文件

2、vim ~/.bash_profile

      JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home
export JAVA_HOME
export CLASSPATH=.:$JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
export CLASSPATH=.:$JAVA_HOME/lib:$CLASSPATH

M3_HOME=/Users/zhangfuxin/zfxTool/apache-maven-3.3.9

PATH=$M3_HOME/bin:$PATH

export M3_HOME
export PATH
HADOOP_HOME=/Users/zhangfuxin/zfxTool/hadoop-2.7.3
PATH=$HADOOP_HOME/bin:$PATH
PATH=$HADOOP_HOME/sbin:$PATH
export HADOOP_HOME
export PATH
3、source ~/.bash_profile

OK 了

posted @ 2016-12-03 19:45  呵呵|java  阅读(631)  评论(0编辑  收藏  举报