Slightly tweak logic for checking for Java
Document additional environment variables