Improvements to Java bindings

This branch adds retry logic to the Java bindings, and unifies loading of environment variables (in order of increasing precedence: built-in defaults, JSON config file, and environment variables).