...skipping one lineDo you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
1
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.为什么我的jdk-1_5_0-linux-i586-rpm.bin包在执行./的时候就会报上面这个错,
我已经下了二次这个新包,不会是包本身的错误。
yes
Unpacking...
Checksumming...
1
The download file appears to be corrupted. Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.为什么我的jdk-1_5_0-linux-i586-rpm.bin包在执行./的时候就会报上面这个错,
我已经下了二次这个新包,不会是包本身的错误。
2、[root@LinuxServer rpm]# ./jdk-1_5_0-linux-i586-rpm.bin
这时会有一段Sun的协议,敲几次空格键,当询问是否同意的时候,敲yes就可以了。
Sun Microsystems, Inc.
Binary Code License Agreement
for the
JAVATM 2 SOFTWARE DEVELOPMENT KIT (J2SDK), STANDARD
EDITION, VERSION 1.5.0…
Do you agree to the above license terms? [yes or no]yes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.40 of 28 November 1998, by Info-ZIP ([email protected]).
inflating: jdk-1_5_0-linux-i586-rpm.rpm
Done. 3. . 程序会自动生成一个jdk-1_5_0-linux-i586.rpm文件,这是主程序包,下面来安装;
[root@LinuxServer rpm]#rpm –ivh jdk-1_5_0-linux-i586.rpm
Preparing... ########################################### [100%]
1:j2sdk ########################################### [100%]
如果是Ubuntu首先需要安装JDK 6
sudo apt-get install sun-java6-jdk之后需要设置默认的java程序
sudo update-alternatives --config java
按照提示输入对应的选项,指定为JDK 6下面设置
sudo vim /etc/environment在其中添加如下两行:
CLASSPATH=/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun
如果其中已经设置了CLASSPATH和JAVA_HOME,则将其修改为上面的形式,按ZZ保存退出。