| 关键词: nbsp java HOME JDK bin 传输 download 命令 以下 profile |
1.从官网下载最新的JDK 6 http://www.oracle.com/technetwork/java/javase/downloads/ Cent OS 用得是 jdk-6u31-linux-i586.bin 2.运用ftp下载到CentOs 中,我的目录是 /usr/java/ 注意下载的时候 要将ftp的传输方式 改为 二进制 命令 : bin 3.安装 jdk ./jdk-6u31-linux-i586.bin 4.更改 /etc/profile 文件 在末尾追加以下信息 JAVA_HOME=/usr/java/jdk1.6.0_31/ JRE_HOME=/usr/java/jdk1.6.0_31/jre/ CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH 5.将信心导入 命令 : source /etc/profile 6.测试 java -version 上面2 中如果没有更改ftp的传输方式的话会出现以下错误 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. |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|