Below I read an excerpt from JDK Questions
How to choose between 32 and 64-bit operation? What is the default? The -d32 and -d64 options have been added to the Java launcher to indicate whether the program should run in a 32 or 64-bit environment. In Solaris, they correspond to the ILP32 and LP64 models, respectively. Since Solaris has 32 and 64-bit J2SE implementations contained within the same Java installation, you can specify any version. If -d32 or -d64 is not specified, it starts by default in a 32-bit environment.
Now, to test this, I went into my 64-bit Ubuntu guest OS and installed the 64-bit version of the JDK - Linux x64 165.24 MB jdk-8u45-linux-x64.tar.gz .
After installing the JDK, when I run my java program using -d64 , then everything will be as expected, because it is actually a 64-bit installation, but when I use -d32 , then I get the error message Error - This Java instance does not support 32 bit JVM .
The error is clear to me, but this line bothers me (as in the paragraph above) "The -d32 and -d64 parameters were added to the Java start-up to indicate whether the program should run in a 32 or 64-bit environment."
According to this line, I understand that when starting Java with a 64-bit version, -d32 can be used to run in 32-bit mode.
Questions:
- Do I understand correctly? And if this is correct, then do I get an error?
- If my understanding is incorrect, then why do I need these command line arguments, because when I started Java using
java , then whatever installation (32-bit or 64-bit JDK) in my PATH would not start.
source share