Implements auto JDK detection