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.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
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:
The above output information does not include 64bit.
If a 64-bit jdk is installed, the output information is as follows:
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!