After installing jdk1.7.0_04, set the environment variables and source at the same time. However, after java -version, you can only view two versions, jdk1.6 and jdk1.5, and these two versions are owned by fedora.
Solution:
#: alternatives --install /usr/bin/java java /usr/local/android/jdk1.7.0_04/bin/java 500
Notice:/usr/local/android/jdk1.7.0_04/ is my jdk installation path.
Then:
alternatives --config java
There will be three options, just select the 1.7 jdk you just installed.