- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
在 Ubuntu 64 12.4 位操作系统下安装jdk-6u45-linux-x64.bin文件
下载地址:http://www.landui.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html
1).假设JDK安装文件放在桌面,我们要安装的目录为:/usr/local/java。
我们先在 /usr/local/目录下创建java文件夹:
aosp444@aosp444-virtual-machine:/usr/local$ sudo mkdir java [sudo] password for aosp444: aosp444@aosp444-virtual-machine:/usr/local$ ll total 44drwxr-xr-x 11 root root 4096 May 30 20:35 ./ drwxr-xr-x 10 root root 4096 Aug 7 2014 ../ drwxr-xr-x 2 root root 4096 Aug 7 2014 bin/ drwxr-xr-x 2 root root 4096 Aug 7 2014 etc/ drwxr-xr-x 2 root root 4096 Aug 7 2014 games/ drwxr-xr-x 2 root root 4096 Aug 7 2014 include/ drwxr-xr-x 2 root root 4096 May 30 20:35 java/ drwxr-xr-x 3 root root 4096 Aug 7 2014 lib/ lrwxrwxrwx 1 root root 9 May 30 19:38 man -> share/man/ drwxr-xr-x 2 root root 4096 Aug 7 2014 sbin/ drwxr-xr-x 7 root root 4096 Aug 8 2014 share/ drwxr-xr-x 2 root root 4096 Aug 7 2014 src/ aosp444@aosp444-virtual-machine:/usr/local$ 1234567891011121314151617
2).切换到桌面,复制安卓文件到安装目录:
aosp444@aosp444-virtual-machine:~/Desktop$ sudo cp jdk-6u45-linux-x64.bin /usr/local/java aosp444@aosp444-virtual-machine:~/Desktop$ 123
1.切换到JDK安装目录下,修改 安装文件权限:
aosp444@aosp444-virtual-machine:/usr/local/java$ sudo chmod 777 jdk-6u45-linux-x64.bin aosp444@aosp444-virtual-machine:/usr/local/java$ 123
2.运行安装文件
aosp444@aosp444-virtual-machine:/usr/local/java$ sudo ./jdk-6u45-linux-x64.bin1
3.安装成功后,java文件夹下多了一个文件夹:
aosp444@aosp444-virtual-machine:/usr/local/java$ ll total 70412drwxr-xr-x 3 root root 4096 May 30 20:46 ./drwxr-xr-x 11 root root 4096 May 30 20:35 ../drwxr-xr-x 8 root root 4096 Mar 27 2013 jdk1.6.0_45/-rwxrwxrwx 1 root root 72087592 May 30 20:39 jdk-6u45-linux-x64.bin*aosp444@aosp444-virtual-machine:/usr/local/java$ 12345678
1).打开/ect/profile 文件
sudo gedit /etc/profile12
2).添加下面的环境变量,要根据安装目录修改,并保存。
# Java Environmentexport JAVA_HOME=/usr/local/java/jdk1.6.0_45 export JRE_HOME=/usr/local/java/jdk1.6.0_45/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH 12345678
3).重启后使其生效并进行验证
也可使用下面的命令不重启使其生效,不过只针对当前域有效。
aosp444@aosp444-virtual-machine:/usr/local/java$ source /etc/profile aosp444@aosp444-virtual-machine:/usr/local/java$ 123
输入java -version 进行验证,成功后如下:
aosp444@aosp444-virtual-machine:/usr/local/java$ java -versionjava version "1.6.0_45"Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode) aosp444@aosp444-virtual-machine:/usr/local/java$ 123456
在 Ubuntu 64 16.4 位操作系统下安装文件jdk-7u55-linux-x64.tar.gz 文件
1).假设JDK安装文件放在桌面,我们要安装的目录为:/usr/local/java。
我们先在 /usr/local/目录下创建java文件夹:
android642@android642-vm:/usr/local$ sudo mkdir java [sudo] password for android642: android642@android642-vm:/usr/local$ ll total 44drwxr-xr-x 11 root root 4096 8月 17 11:29 ./ drwxr-xr-x 11 root root 4096 8月 1 19:24 ../ drwxr-xr-x 2 root root 4096 8月 1 19:17 bin/ drwxr-xr-x 2 root root 4096 8月 1 19:17 etc/ drwxr-xr-x 2 root root 4096 8月 1 19:17 games/ drwxr-xr-x 2 root root 4096 8月 1 19:17 include/ drwxr-xr-x 2 root root 4096 8月 17 11:29 java/ drwxr-xr-x 4 root root 4096 8月 1 19:20 lib/ lrwxrwxrwx 1 root root 9 8月 16 17:59 man -> share/man/ drwxr-xr-x 2 root root 4096 8月 1 19:17 sbin/ drwxr-xr-x 8 root root 4096 8月 1 19:27 share/ drwxr-xr-x 2 root root 4096 8月 1 19:17 src/ android642@android642-vm:/usr/local$ cd java android642@android642-vm:/usr/local/java$ 123456789101112131415161718
2).切换到桌面,复制安卓文件到安装目录:
android642@android642-vm:~/Desktop$ sudo cp jdk-7u80-linux-x64.tar.gz /usr/local/java android642@android642-vm:~/Desktop$12
1).解压jdk-7u80-linux-x64.tar.gz
切换到/usr/loal/java
目录,将jdk-7u80-linux-x64.tar.gz
文件解压到当前目录
2).解压成功后,java文件夹下多了一个文件夹jdk1.7.0_80
:
1).打开/ect/profile 文件
sudo gedit /etc/profile12
2).添加下面的环境变量,要根据安装目录修改,并保存。
# Java Environmentexport JAVA_HOME=/usr/local/java/jdk1.7.0_80 export JRE_HOME=/usr/local/java/jdk1.7.0_80/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$JAVA_HOME:$PATH 12345678
3.重启后使其生效并进行验证
也可使用下面的命令不重启使其生效,不过只针对当前域有效。
android642@android642-vm:/usr/local/java$ source /etc/profile12
输入java -version 进行验证,成功后如下:
android642@android642-vm:/usr/local/java$ java -versionjava version "1.7.0_80"Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode) android642@android642-vm:/usr/local/java$
售前咨询
售后咨询
备案咨询
二维码
TOP