Adding states for java and hostsfile and some other changes