Ubuntu 12.04安装Sun JDK 6
下载 sun jdk 6 bin.
设置权限
chmod +x jdk-6u25-linux-i586.bin
解压文件
./jdk-6u25-linux-i586.bin
移动位置到
sudo mv jdk1.6.0_25 /usr/lib/jvm/
设置系统环境
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_25/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_25/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_25/bin/javaws 1
选择默认java
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
查看java版本:
java -version
下载 sun jdk 6 bin.
设置权限
chmod +x jdk-6u25-linux-i586.bin
解压文件
./jdk-6u25-linux-i586.bin
移动位置到
sudo mv jdk1.6.0_25 /usr/lib/jvm/
设置系统环境
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_25/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_25/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_25/bin/javaws 1
选择默认java
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javaws
查看java版本:
java -version