วันพฤหัสบดี, เมษายน 28, 2554

Ubuntu: install Sun's JDK as a default JDK runtime on Natty-11.04


# cd /usr/lib/jvm
# chmod u+x ~/jdk-6u25-linux-x64.bin
# sudo -s 
# ~/jdk-6u25-linux-x64.bin
press spacebar until saw the question, answer yes, extraction begin
# sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_25/bin/java" 1
# sudo update-alternatives --config java

select choice that have path /usr/lib/jvm/jdk1.6.0_25/bin/java; should be choice 1
now test in Terminal
# java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)


JDK download: http://www.oracle.com/technetwork/java/javase/downloads/index.html

reference: http://www.64bitjungle.com/ubuntu/install-java-jre-160-update-x-on-hardy-as-the-default-java-runtime/

ไม่มีความคิดเห็น :