A simple way for environments to work in Java