Java environments support

Support for environment in Java, adds the drop down in the corner. Also some general fixes from things I had seen when switching environments, like smartcloud profiles samples didn't work in default environment.

I have written some java smartcloud tests and will add them when this is pulled.