Install sun-jdk-1.6 on Ubuntu11.04
setp1: download jdk-6u27-linux-i586.bin
setp2: Create Folder
michael@XXXX:/opt$ sudo mkdir eclipseIDE michael@XXXX:/opt$ sudo mkdir jvm michael@XXXX:/opt$ ls eclipseIDE jvm
setp3:copy jdk-6u27-linux-i586.bin to /opt/jvm
michael@XXXX:/opt$ sudo cp /media/eclipse_and_project/tool/jdk-6u27-linux-i586.bin /opt/jvm/jdk-6u27-linux-i586.bin
setp4: Install jdk-6u27-linux-i586.bin
michael@XXXX:/opt$ sudo sh /opt/jvm/jdk-6u27-linux-i586.bin
setp5: setting java configure
michael@XXXX:/opt$ sudo gedit /etc/environment wireted: export JAVA_HOME=/opt/jvm/jdk1.6.0_27 export JRE_Home=/opt/jvm/jdk1.6.0_27/jre export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
setp6: make it effective
michael@XXXX:/opt$ source ~/.bashrc
setp7: choose a default jdk
michael@XXXX:/opt$ sudo update-alternatives --install /usr/bin/java java /opt/jvm/jdk1.6.0_27/bin/java 300 michael@XXXX:/opt$ sudo update-alternatives --install /usr/bin/javac javac /opt/jvm/jdk1.6.0_27/bin/javac 300 michael@XXXX:/opt$ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode * 1 /opt/jvm/jdk1.6.0_27/bin/java 300 manual mode 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode Press enter to keep the current choice[*], or type selection number: 1 michael@XXXX:/opt$ java -version java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) Server VM (build 20.2-b06, mixed mode) michael@michael-F5V:/opt$
相关推荐
bulargyzone 2020-10-26
csdnxingyuntian 2020-10-19
Locksk 2020-10-12
liufangbaishi0 2020-09-23
darlingtangli 2020-09-10
lxttiger 2020-08-18
coolrainman 2020-07-28
一支菜鸟 2020-07-27
zhouxihua0 2020-07-27
nangongyanya 2020-07-26
chenkai00 2020-07-26
voiletbin 2020-07-26
ChenRuiyz 2020-07-26
pbaabc 2020-07-23
nbfcome 2020-07-19
liufangbaishi0 2020-07-18
ChenRuiyz 2020-07-18
empireghost 2020-07-10
一支菜鸟 2020-07-06