Home  >  Article  >  Operation and Maintenance  >  How to check whether jdk is 32-bit or 64-bit in linux

How to check whether jdk is 32-bit or 64-bit in linux

WBOY
WBOYOriginal
2022-04-06 17:27:194239browse

In Linux, you can use the "java -version" command to check whether the jdk is 32-bit or 64-bit. This command can check the jdk version in the system; if the "64-Bit" field appears, the installed jdk is 64-bit. If the "64-Bit" field does not appear, the installed jdk is 32-bit.

How to check whether jdk is 32-bit or 64-bit in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to check whether jdk is 32-bit or 64-bit in Linux

Use java -version.

JDK is a software development kit in the Java language, mainly used for Java applications on mobile devices and embedded devices. JDK is the core of the entire Java development. It includes the JAVA running environment (JVM Java system class library) and JAVA tools.

If a 32-bit jdk is installed, the output information is as follows:

How to check whether jdk is 32-bit or 64-bit in linux

The above output information does not include 64bit.

If a 64-bit jdk is installed, the output information is as follows:

How to check whether jdk is 32-bit or 64-bit in linux

Expand knowledge:

1. Check the system jdk version:

java -version

.2. Check the jdk’s own installation package:

rpm -qa | grep java

3. If there is a jdk that comes with it, uninstall the old one:

rpm -e --nodeps 要卸载的包(包通过rpm -qa | grep java获取))

or pass Uninstall with the following command:

yum remove *openjdk*

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to check whether jdk is 32-bit or 64-bit in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn