Java environments support

Added the java environments support. I have also created SmartCloud tests for the java samples. Will add them when this is pulled.