Hostname and Java version check patches

This rolls back to commit c5a1e274d1f9b70168c11feff9e85f93bb353ad3.