Jenkins构建任务报错:
ERROR: JAVA_HOME is set to an invalid directory: /opt/jdk1.8.0_152
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
排查原因:
jenkins里的配置文件配置还是原来的jdk,位置:Dashboard-->Global Tool Configuration
解决方法:修改此处jdk地址为正确的jdk地址
执行OK