If you are getting your configuration from environment variables you are in trouble. You should always use commandline parameters to make the configuration explicit. On the other hand it seems acceptable to use envrionment variables as default values for those parameters.
To rephrase it: If you have dependencies make them as obvious as your programming model allows you to. Beware of side effects. And Death* to all the motherfuckers using non-constant static fields in java programs!
*) read unemployment