Apache Ant error on Yosemite

Wait, this message is correct, just include

export JAVA_HOME=$(/usr//java_home)

in your .bash_profile, log out from your account and back in, open a terminal, and type: export

Please copy the output here