java Automatically change configuration based on the current environment How to let the application knew its different running environments so it could change its configuration automatically based on the current one?