• 【Linux】Linux下查找JDK默认安装路径


    一、查找效果图

    二、查找步骤

    1、首先确认是否已按照JDK
    java -version

    [root@iZ2ze3zda3caeyx6pn7c5zZ base-eureka]# java -version
    openjdk version "1.8.0_212"
    OpenJDK Runtime Environment (build 1.8.0_212-b04)
    OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

    2、然后查找java命令的位置

    which java

    [root@iZ2ze3zda3caeyx6pn7c5zZ base-eureka]# which java
    /usr/bin/java

    3、查找java命令的位置所对于的软链地址

    ls -l /usr/bin/java

    [root@iZ2ze3zda3caeyx6pn7c5zZ base-eureka]# ls -l /usr/bin/java
    lrwxrwxrwx 1 root root 22 Jun 18 15:45 /usr/bin/java -> /etc/alternatives/java

    4.最后通过软链地址查找JDK的安装目录

    ls -l /etc/alternatives/java

    [root@iZ2ze3zda3caeyx6pn7c5zZ base-eureka]# ls -l /etc/alternatives/java
    lrwxrwxrwx 1 root root 73 Jun 18 15:45 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java
  • 相关阅读:
    LeetCode Reverse Nodes in k-Group
    LeetCode Unique Binary Search Trees II
    Binary Tree Zigzag Level Order Traversal
    JavaWeb--JSP
    Java--面向对象
    javaScript-进阶篇(三)
    javaScript-进阶篇(二)
    java--常用类
    javaScript-进阶篇(一)
    Java--数组
  • 原文地址:https://www.cnblogs.com/756623607-zhang/p/11442320.html
Copyright © 2020-2023  润新知