Add helper functions and install java7 first.