How do i get the value of a SHELL environment variable in java
<p>on linux command line:</p>

<ol>
<li>export DB_SYSTEM=mysql</li>
<li>echo $DB_SYSTEM 
   result = mysql</li>
<li>Within Java , i want to access and print value of DB_SYSTEM</li>
</ol>

<p>could it be:</p>

<pre>
public Properties getEnvironment() throws java.io.IOException {
    Properties env = new Properties();
    env.load(Runtime.getRuntime().exec("env").getInputStream());
    return env;
    }

Properties env = getEnvironment();
String myEnvVar = env.get("DB_SYSTEM");
</pre>
