In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to install java under linux, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Install java under linux
Java installation
Yum search java
Let's take a look at the corresponding version of java. I installed the java package at version 1.8.
Yum install java-1.8.0-openjdk.x86_64
Once installed, you can use the java command.
Configure the JAVA_HOME configuration file:
Vim / etc/profile, fill in the bottom.
# set java environmentJAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64JRE_HOME=$JAVA_HOME/jreCLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libPATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binexport JAVA_HOME JRE_HOME CLASS_PATH PATH
You need to source after filling it out, and the order is
Source / etc/profile
Still want to use javac?
Yum install-y java-1.8.0-openjdk-devel.x86_64
Once this is installed, you can use javac.
Unloading
Note: sometimes if the installation fails or you want to install a new version of JDK, you can uninstall JDK first:
a. First, execute the command to check the version of JDK under the server: the command is as follows:
Rpm-qa | grep jdk
b. Then execute the command:
Yum-y remove java java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64
Delete each version of the query above in turn.
Thank you for reading this article carefully. I hope the article "how to install java under linux" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.