It is very easy to find out the version of java in use. It is also handy to understand whether a particular java installation is 32 bit or 64 bit
Open a Command Prompt
Simultaneously click the (Windows Logo Key Button + R key) keyboard buttons and in the run box type cmd.
The same can also be done by – Clicking the Windows Start menu and and in the search type cmd.
Issue the Command
java – version
in the command prompt
It gives a lot of information about the java virtual machine. It is clear that the version is 1.7.0_21 and it is a HotSpot VM.
32 Bit or 64 bit Java
The second part of the problem is to find out whether a particular JVM is 32bit or 64 bit. When it is a 64 bit version, the java -version command will output something similar to
Java HotSpot(TM) 64-Bit Server VM
If there is no 64-Bit String getting printed, it is a 32 bit Java Installation.
If you are programmer you can find the java version by printing
sun.arch.data.model=32 // 32 bit JVM
sun.arch.data.model=64 // 64 bit JVM
Issue the command java -d64
If it is not a 64 bit Java installation you will get the above error message. This means it is a 32 bit installation.