java programs for testing environment