Sachin Pathak,
You can use the following to obtain an environment variable:
public static
String TOMCAT_HOME = System.getProperty("catalina.home");
The above will return the TOMCAT_HOME, but you can substitute any valid environment value for "catalina.home" to retreive the setting, i.e. "java_home".
HTH.
Regards,
Todd Nist