ubuntu12.04 桌面版 jdk 安裝

孫悟空空發表於2014-04-02

1.安裝:http://jingyan.baidu.com/article/b0b63dbfd5db8b4a48307027.html

2.上面連結地址,到第6部測試時可能並未成功,還應應輸入如下命令:

   

sudoupdate-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-sun/bin/java 300

sudoupdate-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-7-sun/bin/javac300

sudoupdate-alternatives --install /usr/bin/jar jar /usr/lib/jvm/java-7-sun/bin/jar300

sudoupdate-alternatives --install /usr/bin/javah javah /usr/lib/jvm/java-7-sun/bin/javah 300

sudoupdate-alternatives --install /usr/bin/javap javap /usr/lib/jvm/java-7-sun/bin/javap 300

sudo update-alternatives --config java


注意:命令中的這個/usr/lib/jvm/java-7-sun地址是你jdk解壓縮的地址,應按自己目錄來


3.然後輸入java -version檢測,若出現:/java-7-sun/bin/java permision denied,要修改一下/java-7-sun/bin/java的許可權就可以

  chmode +x /java-7-sun/bin/java

  /java-7-sun/bin/java 當然也是解壓縮的jdk的路徑了

相關文章