hudson.model.Messages.Hudson_NoJavaInPath()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(198)

本文整理了Java中hudson.model.Messages.Hudson_NoJavaInPath()方法的一些代码示例,展示了Messages.Hudson_NoJavaInPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages.Hudson_NoJavaInPath()方法的具体详情如下:
包路径:hudson.model.Messages
类名称:Messages
方法名:Hudson_NoJavaInPath

Messages.Hudson_NoJavaInPath介绍

[英]java is not in your PATH. Maybe you need to <a href=''{0}/configure''>configure JDKs</a>?
[中]java不在你的道路上。也许你需要<a href='{0}/配置'>配置JDK</a>?

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * If the user chose the default JDK, make sure we got 'java' in PATH.
 */
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()));
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * If the user chose the default JDK, make sure we got 'java' in PATH.
 */
public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) {
  if (!value.equals("(Default)")) // 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(Hudson.this)) {
    return FormValidation.ok();
  } else {
    return FormValidation.errorWithMarkup(Messages.Hudson_NoJavaInPath(request.getContextPath()));
  }
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * If the user chose the default JDK, make sure we got 'java' in PATH.
 */
public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) {
  if (!value.equals("(Default)")) // 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(Hudson.this)) {
    return FormValidation.ok();
  } else {
    return FormValidation.errorWithMarkup(Messages.Hudson_NoJavaInPath(request.getContextPath()));
  }
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * If the user chose the default JDK, make sure we got 'java' in PATH.
 */
public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) {
  if (!value.equals("(Default)")) // 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(Hudson.this)) {
    return FormValidation.ok();
  } else {
    return FormValidation.errorWithMarkup(Messages.Hudson_NoJavaInPath(request.getContextPath()));
  }
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * If the user chose the default JDK, make sure we got 'java' in PATH.
 */
public FormValidation doDefaultJDKCheck(StaplerRequest request, @QueryParameter String value) {
  if (!value.equals("(Default)")) // 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(Hudson.this)) {
    return FormValidation.ok();
  } else {
    return FormValidation.errorWithMarkup(Messages.Hudson_NoJavaInPath(request.getContextPath()));
  }
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * If the user chose the default JDK, make sure we got 'java' in PATH.
 */
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()));
}

相关文章

Messages类方法