Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does the Linux system view the jdk installation path

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This "Linux system how to view the jdk installation path" article, the article sample code introduction is very detailed, with a certain reference value, interested friends must refer to, for the "Linux system how to view the jdk installation path", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.

JDK is a software development kit for java language, which is mainly used for Java applications on mobile devices and embedded devices. JDK is the core of java development, including JAVA runtime environment (JVM+JAVA system class library) and JAVA tools.

1:echo $JAVA_HOME

The premise of the installation path that can be located if used is that the environment variable JAVA_HOME is configured, otherwise, as shown below, the installation path of JDK cannot be located at all

[root@localhost ~] # java-version

Java version "1.7.0,65"

OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)

OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

[root@localhost ~] # echo $JAVA_HOME

2:which java

First of all, let's make it clear that which java cannot locate the installation path. Which java locates to the execution path of the java program. So how do you navigate to the installation path of java? Let's take a look at the example, as shown below:

[root@localhost ~] ``# java-version`java version`` "1.7.0y51" ``OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31) ``OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode) ``[root@localhost ~]`` # which java`` / usr/bin/ java`` [root@localhost ~] ``# ls-lrt / usr/bin/ java``lrwxrwxrwxrwx. 1 root root 22 September 6 22:51 ``/ usr/bin/ java``->`` / etc/alternatives/ java`` [root@localhost ~] ``# ls-lrt / etc/alternatives/ java`lrwxrwxrwx. 1 root root 72 September 6 22:51 ``/ etc/alternatives/ java``->`` / usr/lib/jvm/java- 1``.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x8664`` / jre/bin/java

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

The above is all the contents of the article "how to check the jdk installation path on the Linux system". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report