If you want this environment variable available to all users and on system start then you can add the following code
to /etc/profile.d/java.sh (create it if you want):
export JDK_HOME=/usr/lib/jvm/java-7-oracle
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
Then in a terminal run:
sudo chmod +x /etc/profile.d/java.sh
source /etc/profile.d/java.sh