JAVA_HOME variable is not exported as environment variable in bash in Fedora 17. To export JAVA_HOME create a file in „/etc/profile.d/java_home.sh“ and export the variable:

JAVA_HOME=/usr/lib/jvm/jre
export JAVA_HOME