use OS X  command to see whether jdk or jre already exist.