diff --git a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy index 75ae1b3188e..f5d7615846b 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy @@ -85,9 +85,11 @@ spec: stages { stage('Run tests'){ - tools { - jdk 'openjdk-jdk17-latest' - ant 'apache-ant-latest' + environment { + // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of fundamental commands like xvnc, pkill and sh + JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk17-latest') + ANT_HOME = tool(type:'ant', name:'apache-ant-latest') + PATH = "$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" } steps { container ('custom'){ diff --git a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy index 068b5fc83e7..3710f2e0a81 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy @@ -85,9 +85,11 @@ spec: stages { stage('Run tests'){ - tools { - jdk 'openjdk-jdk21-latest' - ant 'apache-ant-latest' + environment { + // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of fundamental commands like xvnc, pkill and sh + JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk21-latest') + ANT_HOME = tool(type:'ant', name:'apache-ant-latest') + PATH = "$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" } steps { container ('custom'){ diff --git a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy index 805be480190..7a29cad234a 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy @@ -85,9 +85,11 @@ spec: stages { stage('Run tests'){ - tools { - jdk 'openjdk-jdk22-latest' - ant 'apache-ant-latest' + environment { + // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of fundamental commands like xvnc, pkill and sh + JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk22-latest') + ANT_HOME = tool(type:'ant', name:'apache-ant-latest') + PATH = "$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" } steps { container ('custom'){