updated java section, needs to be tested.