The thing I'm trying to find out is if my JRE is for 32-bit or 64-bit.
And yes, I have tried java -version / -showversion / -fullversion
but it doesn't say anything useful (at least not to me).
This is what I get when I do java -version
:
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode)
So all I have access to is a zipped JRE's bin-folder, a different JRE is installed and setup, that's not the one I'm trying to check the version of.
Any ideas?
In a 64-bit JVM, you can specify more memory for heap size than in a 32-bit JVM; for example, in a 32-bit JVM, the theoretical maximum memory limit is 4GB, whereas 64-bit is much higher.
We can find JVM bit size 32 bit or 64 bit by running java command from the command prompt. Or we can get it from Java program. We can use System. getProperty("sun.
System.getProperty("sun.arch.data.model");
If you're trying to do it from the command line, file
is your friend:
$ cat `which java` | file -
/dev/stdin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for
GNU/Linux 2.6.32, BuildID[sha1]=440c433f29884a88f874e6d8260f156f4b352818,
stripped
(Using cat
because in my case java
is a symlink.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With