I am new to Java. I am using System.getenv("SPARK_HOME")
to get the spark home path in given machine. When the Java application runs on ubuntu machine it gives null
. The above property is set in bashrc (did source .bashrc
). Tested through echo $SPARK_HOME
which prints the value and also with printenv |grep SPARK_HOME
.
I referred this answer, but it dint help to solve my problem.