ubuntu12.04 64位系统配置jdk1.6和jdk-6u20-linux-i586.bin下载地址

时间:2024-05-01 11:50:39

1:下载地址http://code.google.com/p/autosetup1/downloads/detail?name=jdk-6u20-linux-i586.bin&can=2&q

2:安装:

sudo -s ./jdk-6u20-linux-i586.bin

3:配置环境变量

sudo vim /etc/profile

最后添加

export JAVA_HOME=/home/bestupon/jdk1..0_20
export JRE_HOME=/home/bestupon/jdk1..0_20/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

4:使环境变量生效

source  /etc/profile

5:检验是否安装

java  -version

出现

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)

表示安装正确

6:错误:

ailed to extract the files.  Please refer to the Troubleshooting section of the Installation Instructions on the download page for more information

这种错误是因为版本不匹配造车的,这个安装包是64位的,你的系统是32位的,

7:查看ubuntu是多少位

命令:uname  -ar

Linux ubuntu 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
这是64位的,如果是32位的一般是i386或者i686