To Install JAVA.1.7 in Linux
#wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz
#tar -xzf jdk-7-linux-i586.tar.gz
#mv ./jdk1.7.0/ /usr/lib/jvm/jdk1.7.0
#update-alternatives --config javaIn case you have other answer from
update-alternatives --config java
command, e.g. ‘no alternatives for java’, try this command:#
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java 0
To know under what number you will config you new Java installation.Remember the last number and press enter to exit this utility.
#update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java 3
#java -version
java version “1.7.0″
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
=================================
To update javac
#javac -version
javac 1.6.0_26
# update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0/bin/javac 3
# update-alternatives --config javac
# javac -version
No comments:
Post a Comment