CentOS安装sunjdk
前言:开发程序需要使用到SunJDK,众所周知SunJDK是ORACLE的JDK,一般不好下载,除非你有用户,你也可以注册一个,也可以到其他地方下载(这里附上官方链接)
https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
Warning:下载分ARM和X86的架构注意分清楚,需要查看本地是否安装openjdk(如果有的话需要卸载,防止冲突)
https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
Warning:下载分ARM和X86的架构注意分清楚,需要查看本地是否安装openjdk(如果有的话需要卸载,防止冲突)
1.下载JDK(可以使用Linux的wget下载,这里建议使用windows的IDM下载)
2.建立工作目录以及解压压缩包
[ ~] mkdir /usr/local/java [ ~] tar zxvf jdk-8u162-linux-arm64-vfp-hflt.tar.gz -C /usr/local/java
3.配置环境变量(在末尾加入)
[ ~] vim /etc/profile export JAVA_HOME=/usr/java/jdk1.8.0_162 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$JAVA_HOME/bin:$PATH [ ~] source /etc/profile
4.创建快捷命令访问
[ ~] ln -s /usr/java/jdk1.8.0_162/bin/java /usr/local/bin/java
5.验证
[ ~] java -version java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) Server VM (build 25.65-b01, mixed mode)
相关推荐
changecan 2020-11-19
ECSHOP专属建设 2020-11-13
88427810 2020-11-02
步知道 2020-10-27
Junzizhiai 2020-10-10
jackalwb 2020-10-05
小网管 2020-09-03
shiwenqiang 2020-09-14
85251846 2020-09-14
summerinsist 2020-08-21
87901735 2020-08-19
PinkBean 2020-08-11
85407718 2020-08-09
MichelinMessi 2020-07-30
suosuo 2020-07-28
CARBON 2020-07-28
lizhengfa 2020-07-27
88427810 2020-07-26