Auto-detecting jdk