Search code examples
javawindowsjvm64-bit32-bit

How to find if java.exe is 32-bit or 64-bit?


I have a laptop with Windows 7 Professional 64-bit operating system.

It has a C:\ProgramData\Oracle\Java\javapath folder which contains java.exe. How can I know if this JVM is 32-bit or 64-bit?

I right-click on it and open Properties window and under Detail tab the File version is 8.0.1210.13. But there is no information if it is 32-bit or 64-bit.


Solution

  • You can run C:\ProgramData\Oracle\Java\javapath\java.exe -version. Among the details it prints out, you should see whether it's a 32 or 64 bit version.

    A 32 bit version will return something about a "Client VM" or "Server VM", and a 64 bit version will state so explicitly.

    E.g., the output of my machine (admittedly, a Fedora 25, but the principle should stand):

    openjdk version "1.8.0_121"
    OpenJDK Runtime Environment (build 1.8.0_121-b14)
    OpenJDK 64-Bit Server VM (build 25.121-b14, mixed mode)