title: Unable to set Environment Variables in Spark Application
body: <p>I am trying to set environment variable for my spark application, running in <strong>local</strong> mode.</p>
  
  <p>Here is the spark-submit job:-</p>
  
  <pre><code>spark-submit --conf spark.executorEnv.FOO=bar --class com.amazon.Main SWALiveOrderModelSpark-1.0-super.jar
  </code></pre>
  
  <p>However, when I am trying to access this:-</p>
  
  <pre><code>System.out.println("env variable:- " + System.getenv("FOO"));
  </code></pre>
  
  <p>the output is:- </p>
  
  <pre><code>env variable:- null
  </code></pre>
  
  <p>Does anyone know how I can resolve this?</p>