Class Jdk


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

    • Method Detail

      • 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
      • getLabel

        public String getLabel()
      • getHomeDirectory

        public String getHomeDirectory()