Sunday 5 March 2017

To know Java bit version

Option 1:
------------
Just type java -version in your console.
If a 64 bit version is running, you'll get a message like:
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
A 32 bit version will show something similar to:
java version "1.6.0_41"
Java(TM) SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)
Note Client instead of 64-Bit Server in the third line. The Client/Server part is irrelevant, it's the absence of the 64-Bit that matters.
If multiple Java versions are installed on your system, navigate to the /bin folder of the Java version you want to check, and type java -version there.

========================================
Option 2:
------------
You can try on the command line:
java -d64 -version
If it's not a 64-bit version, you'll get a message that looks like:
This Java instance does not support a 64-bit JVM. Please install the desired version.

No comments:

Post a Comment