¿Cómo verificar la versión de Java bit en Linux? [duplicar]

Posible duplicado:
installed jvm is 64 bit or 32 bit

How do I check which bit version of Java is installed on my linux machine? When I type:

java -version

Yo obtengo:

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)

Is that 32bit or 64bit?

preguntado el 08 de enero de 11 a las 23:01

What do you need to know it for? Native code? -

IIRC, 64-bit JVMs always explicitly mention the fact in their version output. -

4 Respuestas

Corral java es -d64 or -d32 specified, it will give you an error message if it doesn't support 64-bit or 32-bit respectively. Your JVM may support both.

Respondido el 09 de enero de 11 a las 02:01

Why don't you examine System.getProperty("os.arch") value in your code?

Respondido el 09 de enero de 11 a las 02:01

Ve a esto JVM online test y ejecutarlo.

Then check the architecture displayed: x86_64 means you have the 64bit version installed, otherwise it's 32bit.

Respondido el 09 de enero de 11 a las 02:01

Works for every binary, not only java:

file - < $(which java) # heavyly bashic

cat `which java` | file - # universal

Respondido el 09 de enero de 11 a las 05:01

This doesn't tell you if the JVM in question actually supports loading 64bit bytecodes. - sjr

There is no 32 or 64bits bytecode, it is the same. float y int are 32bits, double y long are 64bits on both architecture. - adicto a la concha

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.