Class DefaultJavaProvider

  • All Implemented Interfaces:
    ExtensionPoint

    @Extension
    @Deprecated
    public class DefaultJavaProvider
    extends JavaProvider
    Deprecated.
    Class to try to guess where is java. This is the list of places where it will try to find java:

    • Agent working directory - WORKING_DIRECTORY/jdk/bin/java
    • JAVA_HOME environment variable - JAVA_HOME/bin/java
    • JDK tools configured on Jenkins - JDK_TOOLS_LOCATIONS/bin/java
    • PATH
    • "/usr/bin/java"
    • "/usr/java/default/bin/java"
    • "/usr/java/latest/bin/java"
    • "/usr/local/bin/java"
    • "/usr/local/java/bin/java

    • Constructor Detail

      • DefaultJavaProvider

        public DefaultJavaProvider()
        Deprecated.
    • Method Detail

      • getJavas

        public List<String> getJavas​(SlaveComputer computer,
                                     TaskListener listener,
                                     com.trilead.ssh2.Connection connection)
        Deprecated.
        Description copied from class: JavaProvider
        Returns the list of possible places where java executable might exist.
        Overrides:
        getJavas in class JavaProvider
        Returns:
        Can be empty but never null. Absolute path to the possible locations of Java.