JAVA_HOME is not being passed to ant

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I have an build job which uses Java 1.6. Both java 1.6 and 1.7 are available on the system and I set JAVA_HOME to pickup 1.6.

      Even when I set JAVA_HOME system wide in /etc/environment, ant is being called without that variable and my build is failing.

      I tried the following to find it:

      Renamed the existing ant as ant.bak in /usr/bin, create an file called ant which prints the environment variables and calls the actual ant. The output of the above does not contain the variable JAVA_HOME.

      My system properties shows

      java.home /usr/lib/jvm/java-7-openjdk-amd64/jre
      JAVA_HOME /usr/lib/jvm/java-6-openjdk-amd64

      but it is not taken into consideration. I export JAVA_HOME outside of jenkins and do an ant, the build is success.

      I have not installed the envinject plugin.

      Regards,
      Seenu.

            Assignee:
            Unassigned
            Reporter:
            Srinivasa T N
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: