Get Java Version and Architecture from windows command line

Version and architecture of  java can be identified with the help of windows command line. Java is available in windows 32bit (x86) and 64bit (x86_64) architecture. Following steps will show the version and architecture of java installed in a machine.

Start windows command prompt with administrative rights.

Make java path is set and java command accessible in command line.

Scenario 1 

Environment : 32 bit JRE installed in windows 10 64 bit machine

Type following command

java -d32 -version

sample output

java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) Client VM (build 25.221-b11, mixed mode)

Type following command

java -d64  -version

sample output

Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.

Scenario 2 

Environment : 64 bit JRE installed in windows 10 64 bit machine

Type following command

java -d32 -version

sample output

Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.

Type following command

java -d64  -version

sample output

java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

Comments

Popular posts from this blog

python-docx | docx | No module named 'exceptions'

Fixing TortoiseSVN icons overlay in Windows 10

MySQL 8 User creation and grant privileges