In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Install jdk
Jdk is a necessary tool for running or developing java. A lot of software depends on jdk, so you must learn to install jdk.
1. Check the jdk status of the current system
[root@localhost wj] # rpm-qa | grep java
Tzdata-java-2013g-1.el6.noarch
Java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.i686 / / you can see that jdk is installed on the current system, but the version is too old
Java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.i686
2. Delete the system jdk package
[root@localhost wj] # yum remove-y java-1.6.0
[root@localhost wj] # yum remove-y java-1.7.0
[root@localhost wj] # rpm-qa | grep java / / check whether it has been deleted
Tzdata-java-2013g-1.el6.noarch
3. Go to the official website to download the latest jdk package, http://www.oracle.com/technetwork/java/javase/downloads/index.html, and pay attention to 64-bit or 32-bit when downloading
4. Copy the downloaded package to "/ usr/local/src/" and decompress it.
[root@localhost src] # cp / media/sf_data/jdk-10.0.2_linux-x64_bin.tar / usr/local/src/jdk.tar
[root@localhost src] # tar-xvf jdk.tar
5. Configure the jdk environment variable, open "/ etc/profile", and append the following at the end
[root@localhost src] # gedit / etc/profile
# java environment
Export JAVAHOME=/usr/local/src/jdk-10.0.2 / / this path is the path of jdk decompression.
Export CLASSPATH=.:$ {JAVAHOME} / jre/lib/rt.jar:$ {JAVAHOME} / lib/dt.jar:$ {JAVAHOME} / lib/tools.jar
Export PATH=$PATH:$ {JAVAHOME} / bin
6. Refresh profile
[root@localhost src] # source / etc/profile
7. Test jdk and enter the command "Java-version" in the terminal.
[root@localhost src] # java-version
Java version "1.8.0,181"
Java (TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot (TM) Client VM (build 25.181-b13, mixed mode)
[root@localhost src] #
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.