Setting the JAVA_HOME environment variable in Ubuntu

后端 未结 9 1879
渐次进展
渐次进展 2020-12-16 02:20

I\'m pretty new on ubuntu, at some point in the terminal I\'m running:

mortar local:illustrate pigscripts/retail-recsys.pig purchase_input -f params/retail.p         


        
9条回答
  •  -上瘾入骨i
    2020-12-16 02:36

    export JAVA_HOME=/usr/lib/jvm/java-7-oracle
    

    in your ~/.bashrc file.

    If you want this environment variable available to all users and on system start then you can add the following to /etc/profile.d/java.sh (create it if necessary):

    export JDK_HOME=/usr/lib/jvm/java-7-oracle
    export JAVA_HOME=/usr/lib/jvm/java-7-oracle
    

    Then in a terminal run:

    sudo chmod +x /etc/profile.d/java.sh
    source /etc/profile.d/java.sh
    

提交回复
热议问题