Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 8 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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