Setting the JAVA_HOME environment variable in Ubuntu

后端 未结 9 1876
渐次进展
渐次进展 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条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-16 02:40

    For JAVA_HOME to point to the active jdk, add to your ~/.bashrc

    export JAVA_HOME=$(update-alternatives --query javac | sed -n -e 's/Best: *\(.*\)\/bin\/javac/\1/p')
    

    which will dynamically set the $JAVA_HOME to the JDK selected by update-alternatives.

提交回复
热议问题