2. gzip -d jdk-7-linux-x64.tar.gz
3. tar -xvf jdk-7-linux-x64.tar
4. sudo mv ./jdk1.7.0/ /usr/lib/jvm/jdk1.7.0
5. sudo update-alternatives --config java
6. sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java "3"<---Step 5 看到的最後一個順序+1
7. sudo update-alternatives --config java <--- 指定系統用的 JAVA
or
6. sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java 0 --- 如果你啥都沒裝的話
Check by "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)
Done!
OR!!! http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html
OR!!! http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in.html
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer
sudo apt-get remove oracle-jdk7-installer
沒有留言:
張貼留言