Setting JAVA_HOME not working in Sierra
To set JAVA_HOME, you should use

export JAVA_HOME=`/usr/libexec/java_home -v "1.7*"`


or

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home


currently you  did not use export on the variable. Environment variables that are set without the export command will not be inherited in the environment of the commands you are calling, so it would not be read by Java.