Question: I have an application which can
be run using 64 bit JNI libraries, or 32 bit libraries depending on the command
line parameters. I want to know if there is any way for me to find out if the
JVM is running in 64 bit mode (the -d64 parameter was sent to it) or 32 bit
mode.
Answer: Run this small program and you will
get a long list of System properties...
public class ShowSystemProperties {
public static void main(String[] args) {
System.getProperties().list(System.out);
}
}
One of lines will be
sun.arch.data.model=32
or
sun.arch.data.model=64
Just search for it and you will know which version you are running on. Of
course, you can get and analyse in your running program as well.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.