$ export JAVA_HOME="$(/usr/libexec/java_home --version 1.8.0_251)"
Hope this helps somebody!
(because I know that someday that somebody will be me!!)
My thoughts on food, technology, politics, running and... nope, those are the only thoughts I've got!