In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use YUM to install JDK under Linux, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
JDK is the abbreviation of Java Development Kit (Java Development Kit). Literally translated is the tool developed by java. It is a development environment for building applications, applet, and components released on the Java platform. It includes JVM, Java compiler, a large number of Java tools, and the Java basic API contains the Java class library and Java language specifications.
Img1. Check the jdk version currently supported on the cloud [root@localhost ~] # yum search java | grep jdkldapjdk-javadoc.noarch: Javadoc for ldapjdkjava-1.6.0-openjdk.x86_64: OpenJDK Runtime Environmentjava-1.6.0-openjdk-demo.x86_64: OpenJDK Demosjava-1.6.0-openjdk-devel.x86_64: OpenJDK Development Environmentjava-1.6.0-openjdk-javadoc.x86_64: OpenJDK API Documentationjava-1.6.0-openjdk-src.x86_64: OpenJDK Source Bundlejava -1.7.0-openjdk.x86_64: OpenJDK Runtime Environmentjava-1.7.0-openjdk-accessibility.x86_64: OpenJDK accessibility connectorjava-1.7.0-openjdk-demo.x86_64: OpenJDK Demosjava-1.7.0-openjdk-devel.x86_64: OpenJDK Development Environmentjava-1.7.0-openjdk-headless.x86_64: The OpenJDK runtime environment withoutjava-1.7.0-openjdk-javadoc.noarch: OpenJDK API Documentationjava-1.7.0-openjdk-src.x86_64: OpenJDK Source Bundlejava-1.8.0-openjdk.i686: OpenJDK Runtime Environmentjava-1.8.0-openjdk.x86_64: OpenJDK Runtime Environmentjava-1.8.0-openjdk-accessibility.i686: OpenJDK accessibility connectorjava-1.8.0-openjdk-accessibility.x86_64: OpenJDK accessibility connectorjava-1.8.0-openjdk-accessibility-debug.i686: OpenJDK accessibility connectorjava-1.8.0-openjdk-accessibility-debug.x86_64: OpenJDK accessibility connectorjava-1.8.0-openjdk-debug.i686: OpenJDK Runtime Environment with full debug onjava-1.8.0-openjdk-debug.x86_64: OpenJDK Runtime Environment with full debug onjava-1.8.0-openjdk-demo.i686: OpenJDK Demosjava-1.8.0-openjdk-demo.x86_64: OpenJDK Demosjava-1.8.0-openjdk-demo-debug.i686: OpenJDK Demos with full debug onjava-1.8.0-openjdk-demo-debug.x86_64: OpenJDK Demos with full debug onjava-1.8.0-openjdk-devel.i686: OpenJDK Development Environmentjava- 1.8.0-openjdk-devel.x86_64: OpenJDK Development Environmentjava-1.8.0-openjdk-devel-debug.i686: OpenJDK Development Environment with fulljava-1.8.0-openjdk-devel-debug.x86_64: OpenJDK Development Environment withjava-1.8.0-openjdk-headless.i686: OpenJDK Runtime Environmentjava-1.8.0-openjdk-headless.x86_64: OpenJDK Runtime Environmentjava-1.8.0-openjdk-headless-debug.i686: OpenJDK Runtime Environment with fulljava-1.8.0-openjdk -headless-debug.x86_64: OpenJDK Runtime Environment with fulljava-1.8.0-openjdk-javadoc.noarch: OpenJDK API Documentationjava-1.8.0-openjdk-javadoc-debug.noarch: OpenJDK API Documentation for packagesjava-1.8.0-openjdk-javadoc-zip.noarch: OpenJDK API Documentation compressed injava-1.8.0-openjdk-javadoc-zip-debug.noarch: OpenJDK API Documentationjava-1.8.0-openjdk-src.i686: OpenJDK Source Bundlejava-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundlejava-1.8.0-openjdk-src-debug.i686: OpenJDK Source Bundle for packages withjava-1.8.0-openjdk-src-debug.x86_64: OpenJDK Source Bundle for packages withldapjdk.noarch: The Mozilla LDAP Java SDK2. After selecting the version Install (execute the following command to automatically install jdk-related dependencies [root@localhost] # yum install-y java-1.8.0-openjdk loaded plug-ins: fastestmirrorLoading mirror speeds from cached hostfile* base: mirrors.zju.edu.cn* extras: mirror.bit.edu.cn* updates: mirrors.aliyun.com is resolving dependencies-- > checking transactions-- > package java-1.8.0-openjdk.x86_64.1. 1.8.0.151-5.b12.el7_4 will be installed-- > processing dependencies java-1.8.0-openjdk-headless (x86-64) = 1purl 1.8.0.151-5.b12.el7_4 It is required by package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependency xorg-x11-fonts-Type1, it is required by package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependency libpng15.so.15 (PNG15_0) (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is processing dependencies libjvm.so (SUNWprivate_1.1) (64bit), and it is needed by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libjpeg.so.62 (LIBJPEG_6.2) (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is processing dependencies libjli.so (SUNWprivate_1.1) (64bit), and it is needed by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libjava.so (SUNWprivate_1.1) (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies fontconfig (x86-64), it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libpng15.so.15 () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is dealing with dependencies libjvm.so () (64bit), and it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libjpeg.so.62 () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is dealing with dependencies libjli.so () (64bit), and it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libjava.so () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is dealing with dependencies libgif.so.4 () (64bit), and it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libawt.so () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is dealing with dependencies libXtst.so.6 () (64bit), and it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libXrender.so.1 () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is dealing with dependencies libXi.so.6 () (64bit), and it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libXext.so.6 () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > is dealing with dependencies libXcomposite.so.1 () (64bit), and it is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64-- > processing dependencies libX11.so.6 () (64bit) It is required by the package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64. 3. The installation is complete. Verify whether the installation is successful [root@localhost ~] # java-versionopenjdk version "1.8.0mm 151" OpenJDK Runtime Environment (build 1.8.0_151-b12) OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode) 4. Search the java file to find the default installation directory of jdk [root@localhost ~] # find /-name 'java'/etc/pki/ca-trust/extracted/java/etc/pki/java/etc/java/etc/alternatives/java/var/lib/alternatives/java/usr/bin/java/usr/lib/java/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre/bin/java/usr/share/java
Tip: it is simple and fast to install jdk online through the yum command, and you can use java-related services without configuring environment variables.
Thank you for reading this article carefully. I hope the article "how to use YUM to install JDK under Linux" shared by the editor will be helpful to everyone. At the same time, I also hope you can 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.