Configure Java RTE in CentOS
- 2020-06-16 15:02:00
- Memory
- Original 1730
Configure Java RTE in CentOS
Two ways to configure Java runtime environment in CentOS.
Update the software package
Make sure the server software package is updated.
sudo yum update -y
Method 1
Install OpenJRE.
sudo yum install java-1.8.0-openjdk -yCheck whether it is installed.
java -version
Method 2
Download JDK from Oracle website, and unzip it to /usr/local/java/jdk1.8.0_241. You need to sign up to download, and it is free.
Open the file.
vim /etc/profileAdd the code below to the end of the file.
export JAVA_HOME=/usr/local/java/jdk1.8.0_241 export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATHMake it work.
source /etc/profileAdd a soft link.
ln -s ${JAVA_HOME}/bin/java /usr/bin/javaCheck whether it is installed.
java -version
Write a Comment
Support
- Book a Demo
- Tech Forum
- GitHub
- SourceForge
About Us
- Company
- Privacy Policy
- Term of Use
- Blogs
- Partners
Contact Us
- Leave a Message
- Email Us: [email protected]