Auto check JDK and link JDK 1.6