Java file now functional