added java functions to setup