添加 ubuntu-jdk8.md
This commit is contained in:
commit
0c9f557d31
32
ubuntu-jdk8.md
Normal file
32
ubuntu-jdk8.md
Normal file
@ -0,0 +1,32 @@
|
||||
下载解压安装包
|
||||
```
|
||||
cd /usr/local
|
||||
```
|
||||
```
|
||||
wget https://mirrors.huaweicloud.com/java/jdk/8u202-b08/jdk-8u202-linux-x64.tar.gz
|
||||
```
|
||||
```
|
||||
tar -zvxf jdk-8u202-linux-x64.tar.gz
|
||||
```
|
||||
|
||||
配置环境变量
|
||||
```
|
||||
vim /etc/profile
|
||||
```
|
||||
|
||||
复制粘贴
|
||||
```
|
||||
export JAVA_HOME=/usr/local/jdk1.8.0_202
|
||||
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
|
||||
export PATH=$PATH:$JAVA_HOME/bin
|
||||
```
|
||||
|
||||
刷新
|
||||
```
|
||||
source /etc/profile
|
||||
```
|
||||
|
||||
验证
|
||||
```
|
||||
java -version
|
||||
```
|
Loading…
Reference in New Issue
Block a user