buildAgent uses wrong JAVA_HOME
Dear,
We are using TeamCity in our company, and we have an issue with a specific build using JDK 1.7 (all the others are using java 1.8). I can set env.JAVA_HOME, system JAVA_HOME (even the JAVA_HOME that TeamCity uses to start), and the alternatives point to 1.7, BUT for an unknown reason, TeamCiy launch the application with java 1.8. The only way to avoid it to start in java 1.8 is to remove the java 1.8 from the system.
It seems that at start, TeamCity agent launch a "search java" script and gives me:
[2018-03-20 20:25:47,515] INFO - javaDowser.JavaDowserAgentImpl - JavaDowser: Found 4 java installations:
1.8/64 (1.8.0_144) at /usr/java/latest (JDK) [200]
1.8/64 (1.8.0_144) at /usr/java/jdk-1.8 (JDK) [200]
1.7/64 (1.7.0_80) at /usr/java/jdk-1.7 (JDK) [200]
1.7/64 (1.7.0_80) at /usr/java/jdk1.7.0_40 (JDK) [200]
I don't know why, he uses JDK 1.8 (latest), instead of 1.7 as specified in the build configuration. Any idea?
Thanks in advance!
Please sign in to leave a comment.
Ok, I found out... My build was using JRE_HOME instead of JAVA_HOME... Sorry for any inconvenience...