code: public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) {
          if(!JDK.isDefaultName(value))
              // assume the user configured named ones properly in system config ---
              // or else system config should have reported form field validation errors.
              return FormValidation.ok();
  
          // default JDK selected. Does such java really exist?
          if(JDK.isDefaultJDKValid(Jenkins.this))
              return FormValidation.ok();
          else
              return FormValidation.errorWithMarkup(Messages.Hudson_NoJavaInPath(request.getContextPath()));
      }
docs: If the user chose the default JDK, make sure we got 'java' in PATH.