本文整理了Java中hudson.model.JDK.getHome()
方法的一些代码示例,展示了JDK.getHome()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDK.getHome()
方法的具体详情如下:
包路径:hudson.model.JDK
类名称:JDK
方法名:getHome
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* install directory.
*
* @deprecated as of 1.304
* Use {@link #getHome()}
*/
@Deprecated
public String getJavaHome() {
return getHome();
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the path to the bin directory.
*/
public File getBinDir() {
return new File(getHome(),"bin");
}
/**
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the path to 'java'.
*/
private File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(),"bin/"+execName);
}
代码示例来源:origin: jenkinsci/jenkins
/**
* @deprecated as of 1.460. Use {@link #buildEnvVars(EnvVars)}
*/
@Deprecated
public void buildEnvVars(Map<String,String> env) {
String home = getHome();
if (home == null) {
return;
}
// see EnvVars javadoc for why this adds PATH.
env.put("PATH+JDK",home+"/bin");
env.put("JAVA_HOME", home);
}
代码示例来源:origin: jenkinsci/jenkins
public JDK forEnvironment(EnvVars environment) {
return new JDK(getName(), environment.expand(getHome()));
}
代码示例来源:origin: jenkinsci/configuration-as-code-plugin
@Test
@ConfiguredWithCode("JdkConfiguratorTest.yml")
public void should_configure_maven_tools_and_global_config() {
final Object descriptor = j.jenkins.getDescriptorOrDie(JDK.class);
Assert.assertNotNull(descriptor);
Assert.assertEquals(1, ((JDK.DescriptorImpl) descriptor).getInstallations().length);
JDK jdk = ((JDK.DescriptorImpl) descriptor).getInstallations()[0];
Assert.assertEquals("jdk8", jdk.getName());
Assert.assertEquals("/jdk", jdk.getHome());
InstallSourceProperty installSourceProperty = jdk.getProperties().get(InstallSourceProperty.class);
Assert.assertEquals(1, installSourceProperty.installers.size());
JDKInstaller installer = installSourceProperty.installers.get(JDKInstaller.class);
Assert.assertEquals("jdk-8u181-oth-JPR", installer.id);
Assert.assertTrue(installer.acceptLicense);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* install directory.
*
* @deprecated as of 1.304
* Use {@link #getHome()}
*/
public String getJavaHome() {
return getHome();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* install directory.
*
* @deprecated as of 1.304 Use {@link #getHome()}
*/
public String getJavaHome() {
return getHome();
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Sets PATH and JAVA_HOME from this JDK.
*/
public void buildEnvVars(Map<String,String> env) {
// see EnvVars javadoc for why this adss PATH.
env.put("PATH+JDK",getHome()+"/bin");
env.put("JAVA_HOME",getHome());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the path to 'java'.
*/
private File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(),"bin/"+execName);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the path to the bin directory.
*/
public File getBinDir() {
return new File(getHome(),"bin");
}
/**
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the path to the bin directory.
*/
public File getBinDir() {
return new File(getHome(),"bin");
}
/**
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Sets PATH and JAVA_HOME from this JDK.
*/
public void buildEnvVars(Map<String, String> env) {
// see EnvVars javadoc for why this adss PATH.
env.put("PATH+JDK", getHome() + "/bin");
env.put("JAVA_HOME", getHome());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets the path to 'java'.
*/
public File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(),"bin/"+execName);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Sets PATH and JAVA_HOME from this JDK.
*/
public void buildEnvVars(Map<String,String> env) {
// see EnvVars javadoc for why this adss PATH.
env.put("PATH+JDK",getHome()+"/bin");
env.put("JAVA_HOME",getHome());
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the path to 'java'.
*/
public File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(),"bin/"+execName);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Sets PATH and JAVA_HOME from this JDK.
*/
public void buildEnvVars(Map<String,String> env) {
// see EnvVars javadoc for why this adss PATH.
env.put("PATH+JDK",getHome()+"/bin");
env.put("JAVA_HOME",getHome());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* install directory.
*
* @deprecated as of 1.304
* Use {@link #getHome()}
*/
@Deprecated
public String getJavaHome() {
return getHome();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets the path to 'java'.
*/
public File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(), "bin/" + execName);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the path to the bin directory.
*/
public File getBinDir() {
return new File(getHome(),"bin");
}
/**
内容来源于网络,如有侵权,请联系作者删除!