add JavaHomes class and its test case