SoFunction
Updated on 2025-03-01

Based on the JDK1.6 version built in Fedora14, the solution to install jdk1.7 is not recognized

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.