adding function to change java jdk version for mac