不积跬步,无以至千里
博客
Python
Python
Flask
Django
FastAPI
设计模式(Python语言)
数据结构与算法(Python语言)
爬虫
数据分析
Java
Java
SpringBoot
SprintCloud
CC++
C语言
C++语言
Go
Go
设计模式(Go)
数据结构与算法(Go)
云计算
云计算理论
Linux
Shell
云原生
云原生理论
Docker
Kubernetes
Kubersphere
DevOps
Git
Gitlab
Jenkins
Nexus
Harbor
SonarQube
Grafana
OpenQA
建木
禅道
Compass-CI
前端
HTML
CSS
JavaScript
BootStrap
Vue
React
Markdown
数据库
MySql
Redis
MongoDB
H2 Database
Liquibase
ElasticStack
中间件
MQ
Kafka
Nginx
cpolar
阿里云
测试
测试理论
安全测试
压力测试
Pytest
UnitTest
考试
软考中级(软件设计师考试)
软考高级(系统架构设计师考试)
登录
注册
CentOS7系统安装jdk1.8
收藏本文
作者:redrose2100 类别:Java 日期:2022-05-23 16:42:26 阅读:813 次 消耗积分:0 分
[【原文链接】CentOS7系统安装jdk1.8](http://devops-dev.com/article/296) ## 1、下载jdk安装包 打开 [jdk下载地址](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html),找到linux下64位的安装包,点击下载(注意此步骤需要注册Oracle账号并登录 ## 2、将安装包上传至服务器 ## 3、解压 ```bash tar -zxvf jdk-8u331-linux-x64.tar.gz ``` ## 4、将解压文件夹移动至 /usr/local/目录下 ```bash mv jdk1.8.0_331 /usr/local/ ``` ## 5、配置环境变量 ```bash vi /etc/profile ``` 在文件末尾增加以下内容 ```bash export JAVA_HOME=/usr/local/jdk1.8.0_331 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib ``` ## 6、使环境变量生效 ```bash source /etc/profile ``` ## 7、查看java版本号 ```bash [root@iZbp1flzt6x7pxmxfhmxeeZ pkg]# java -version java version "1.8.0_331" Java(TM) SE Runtime Environment (build 1.8.0_331-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.331-b09, mixed mode) [root@iZbp1flzt6x7pxmxfhmxeeZ pkg]# ``` ## 8、执行javac,如下表示环境配置已经配置OK ```bash [root@iZbp1flzt6x7pxmxfhmxeeZ pkg]# javac Usage: javac
where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath
Specify where to find user class files and annotation processors -cp
Specify where to find user class files and annotation processors -sourcepath
Specify where to find input source files -bootclasspath
Override location of bootstrap class files -extdirs
Override location of installed extensions -endorseddirs
Override location of endorsed standards path -proc:{none,only} Control whether annotation processing and/or compilation is done. -processor
[,
,
...] Names of the annotation processors to run; bypasses default discovery process -processorpath
Specify where to find annotation processors -parameters Generate metadata for reflection on method parameters -d
Specify where to place generated class files -s
Specify where to place generated source files -h
Specify where to place generated native header files -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files -encoding
Specify character encoding used by source files -source
Provide source compatibility with specified release -target
Generate class files for specific VM version -profile
Check that API used is available in the specified profile -version Version information -help Print a synopsis of standard options -Akey[=value] Options to pass to annotation processors -X Print a synopsis of nonstandard options -J
Pass
directly to the runtime system -Werror Terminate compilation if warnings occur @
Read options and filenames from file [root@iZbp1flzt6x7pxmxfhmxeeZ pkg]# ```
始终坚持开源开放共享精神,同时感谢您的充电鼓励和支持!
版权所有,转载本站文章请注明出处:redrose2100, http://blog.redrose2100.com/article/296
上一篇:
Kubernetes----Kubernetes学习从入门到实战循序渐进系列篇
下一篇:
基于CentOS7系统虚拟机部署Jenkins环境
你的昵称:
你的评论:
提示:登录后添加有效评论可享受积分哦!
点此登录
搜索
个人成就
DevOps技术交流微信群
加微信邀请进群
常用网站链接
开源软件洞察
云原生技术栈全景图
Python语言官方文档
Go语言官方文档
Docker官方文档
Jenkins中文用户手册
Markdown语法官方教程
Harbor官方文档
openQA官方文档
云原生开源社区
开源中国
Kubernetes中文文档
Kubernetes中文社区
Kubersphere官方文档
BootStrap中文网站
JavaScript中文网
NumPy官方文档
Pandas官方文档
GitLink确实开源网站
数据库排名网站
编程语言排名网站
SEO综合查询网站
数学加减法练习自动生成网站
Kickstart Generator
文章分类
最新文章
最多阅读
特别推荐
×
Close
登录
注册
找回密码
登录邮箱:
登录密码:
图片验证码:
注册邮箱:
注册密码:
邮箱验证码:
发送邮件
注册邮箱:
新的密码:
邮箱验证码:
发送邮件