I am trying to detect which version of the java is running in my system (i mean i want to find out whether my java installation is 32 bit or 64 bit)

I have tried

$java -version 

which outputs following

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
  1. is this java 64bit install ?
  2. is this means java VM is running 64 bit or can it run on both mode ?
  3. If i has to install java 64 version as well, and setup the JAVA_HOME var to that path how to do this ?
  4. Long time ago (10 years ago) i did learn java, but those days we didnt had anything called java server like above, is this something different to normal JVM those days ?
  5. is in Centos can we run java as a Service ?

anyone who can help me, really appreciated.


From a similar question on StackExchange:

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.

Consult the help options of the JVM for more info java -help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.