I tried to find a way how to check if person have 32-bit version or 64-bit version. I need that to make code to do something if there is 32-bit and code which will do something when you have 64-bit.
Asked
Active
Viewed 372 times
1 Answers
-1
check this code
System.getProperty("os.arch");

Ng Sharma
- 2,072
- 8
- 27
- 49
-
1`System.getProperty("os.arch")` returns information about the os, not the vm/jre. You can still run a 32-bit JRE on a 64-bit OS. Try `sun.arch.data.model` which is Oracle VM specific or `java.vm.name` which should end in `32` or `64`. – Horse Badorties Apr 18 '20 at 18:49