Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

${env.JAVA_HOME} not found - Ant

In my build.xml file, I have these lines:

<property environment="env"/>
<echo message="JAVA_HOME is set to = ${env.JAVA_HOME}" />

On some machine, this would print

"JAVA_HOME is set to = /usr/jdk1.6"

But on some others, it would print this

"JAVA_HOME is set to = ${env.JAVA_HOME}"

Does anyone know what might cause this?

Thanks

like image 243
One Two Three Avatar asked Jul 10 '13 13:07

One Two Three


1 Answers

The message tells you that Ant was not able to resolve the property env.JAVA_HOME; this means that the environment variable JAVA_HOME was not set in that machine.

like image 170
smooth reggae Avatar answered Sep 23 '22 07:09

smooth reggae