title: Best way to set environmental variables in WebLogic startup
body: <p>In Oracle WebLogic, what is the best way to set an environmental variable so that it can be accessed by your code?  We have third-party apps running WebLogic that look for an environment variable.  </p>
  
  <p>Note: We start our managed servers using Node Manager.</p>
  
  <p>I would prefer to be able to set it somewhere in the domain configuration, like in the Server Start tab in the Admin Console, but there seems no good place to do that.</p>
  
  <p>The only way I can see to do it would be</p>
  
  <ol>
  <li>Edit the <code>bin/setDomainEnv.sh</code> to export the environmental variable</li>
  <li>Modify <code>nodemanager.properties</code> to have <code>StartScriptEnabled=true</code></li>
  </ol>
  
  <p>What this does is, forces NodeManager to use the <code>&lt;ms_home&gt;/bin/startManagedWebLogic.sh</code>, which sources <code>setDomainEnv.sh</code> and they will be picked up when NodeManager starts.  But you also have to do this on every machine.</p>
  
  <p>Wondering if there is a cleaner way of doing this than mucking with Oracle's startup scripts.</p>