2

Is there a clear or easy way to check over the command line if the installed JRE is 64 bit on a Sparc machine?

I am used to seeing this in:

java -version 

however it appears that Solaris only says what version and build of java is installed.

rwyland
  • 1,637
  • 3
  • 16
  • 30

2 Answers2

7

Run java -d64 -version. It will complain if a 64 bit JVM isn't installed.

rwyland
  • 1,637
  • 3
  • 16
  • 30
jlliagre
  • 29,783
  • 6
  • 61
  • 72
  • Thanks @jlliagre I ran a quick program that printed "sun.arch.data.model" and was continually getting 32, however when I ran the -d64 flag I received the the result of 64. Will the machine know when to use 64 bit or will you always have to specify? – rwyland Nov 22 '11 at 22:17
  • The machine cannot "know" when to use 64 bit, it is your choice when you start the JVM. – jlliagre Nov 23 '11 at 06:15
  • I am used to *nix machines automatically using the 64 bit JVM when its installed; I thought it was odd that the JVM in solaris runs 32 and 64 at the same time, but I guess that is why you have to specify. Thanks again – rwyland Nov 23 '11 at 14:57
  • Thank you, just looking for it. – Tuan Jul 22 '14 at 10:32
-1

If d ( in lower case) does not work, put D in Upper case.

milo526
  • 5,012
  • 5
  • 41
  • 60
Paresh
  • 1