首页 > 系统相关 >jdk1.8的安装 linux

jdk1.8的安装 linux

时间:2022-12-27 21:45:49浏览次数:53  
标签:jdk1.8 JAVA tar jdk linux HOME 安装

1、下载
 wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"  http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz

2、解压
tar -zxvf jdk-8u131-linux-x64.tar.gz

mv jdk1.8.0_131  /usr/local/jdk/jdk1.8

3、配置环境变量
vi /etc/profile

export JAVA_HOME=/usr/local/jdk/jdk1.8
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

4、配置生效
source /etc/profile

5、查看java版本
 java  -version

标签:jdk1.8,JAVA,tar,jdk,linux,HOME,安装
From: https://www.cnblogs.com/niun/p/17009060.html

相关文章