pipeline {
agent any
stages {
stage ("first") {
tools {
jdk "jdk-1.8.101"
}
steps {
sh 'java -version'
}
}
stage("second"){
tools {
jdk "jdk-1.8.152"
}
steps{
sh 'java -version'
}
}
}
}