java.lang.Object
com.atlassian.bamboo.configuration.Jdk

public class Jdk extends Object
This class is a POJO holding the information about a system JDK.
  • Field Details

  • Constructor Details

  • Method Details

    • isValid

      public boolean isValid()
      Does this object reference a valid JDK?
      Returns:
      Does the homeDirectory contain bin/java and lib/tools.jar?
    • isAJdk

      public boolean isAJdk()
      Does the given homeDirectory reference a JDK home?
      Returns:
      true iff it contains a lib/tools.jar
    • discoverDefaultJdk

      @NotNull public static @NotNull Jdk discoverDefaultJdk()
      For some reason, the system's JAVA_HOME is sometimes the Jdk's Jre directory.

      If that's the case, we return the parent dir.

      Returns:
      The default system JDK
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLabel

      public String getLabel()
    • getHomeDirectory

      public String getHomeDirectory()