I want to detect the Java Runtime Environment bit(32 or 64) programmatically using VC++.Please suggest how can I do this.
Asked
Active
Viewed 70 times
1 Answers
1
Its fairly simple actualy, you can use system("command") to see its version(dont forget to include stdlib.h) like this:
system("java -d64 -version");
and on your console you will get the reaply, if it says :
This Java instance does not support a 64-bit JVM. Please install the desired version
this means it's not a 64-bit version.
you can read much more about it in here: detect jre bit version
Community
- 1
- 1
Ravid Goldenberg
- 1,799
- 3
- 35
- 57