Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installed jvm is 64 bit or 32 bit [duplicate]

How can I identity whether the installed version of Java is 64 bit or 32 bit ?

like image 416
Karthick Ragunath Avatar asked Jan 01 '11 12:01

Karthick Ragunath


People also ask

Is Java 32 or 64 bit?

Java is available on Microsoft Windows in 64 and 32 bit versions, allowing users to get the appropriate version for their system. Users can even run both side-by-side for 64 bit operating systems.

Can I have both 32 and 64 bit Java?

Yes, it is absolutely no problem. You could even have multiple versions of both 32bit and 64bit Java installed at the same time on the same machine.


1 Answers

Enter java -version on the command line. If it's 64-bits it will say so, otherwise it's 32-bits.

E.g.

64 bits Oracle / Mac OS X

$ java -version

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)

32 bits Oracle / Mac OS X (client)

$ java -version

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) Client VM (build 16.3-b01-279, mixed mode, sharing)

32 bits Oracle / Mac OS X (server)

$ java -server -version

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) Server VM (build 16.3-b01-279, mixed mode)

64 bits OpenJDK Ubuntu

$ java -version

java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.1) (6b20-1.9.1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)

32 bits Soylatte Mac OS X

$ java -version

java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
Java HotSpot(TM) Client VM (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00, mixed mode)

32 bits OpenJDK Mac OS X

$ java -version

openjdk version "1.6.0-internal"
OpenJDK Runtime Environment (build 1.6.0-internal-landonf_17_may_2009_13_58-b00)
OpenJDK Client VM (build 11.0-b17, mixed mode)

64 bits IBM Linux

$ java -version

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr8fp1-20100624_01(SR8 FP1))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr8ifx-20100609_59383 (JIT enabled, AOT enabled)
like image 52
Arjan Tijms Avatar answered Nov 16 '22 03:11

Arjan Tijms