AFAIK The -d64 and -d32 only ever worked on Sparc Solaris.
If you have 64-bit JVM it will run all your programs unless they use a 32-bit shared library, in which case I suggest either a) don't do that or b) use the 32-bit JVM only when you need to by specifying the path.
Answer from Peter Lawrey on Stack OverflowIm trying to use this program that requires 32-bit java, but going to the download page automatically directs me to the 64-bit download page (which I already own, but do not need for this program), can anyone help?
edit: clarifying a couple questions and what happened, it said in the read me document for the program that it requires 32-bit java, I also was able to find a version of it that can use 64-bit java so no worries, thank you for all the help!
cmd - Enabling both 32 and 64 bit Java Runtime Environment - Stack Overflow
Newest Java Runtime Environment (JRE) in 32 and 64 bit - Stack Overflow
java - JRE 32bit vs 64bit - Stack Overflow
Question - Java Runtime Environment (JRE) version 8 or 10 ? | Tom's Hardware Forum
Videos
Per java.com, you only need the 64bit JRE if you plan on running a 64bit browser. Windows x64 systems by default have seperate 32 and 64bit versions of IE, so if you plan to use the x64 option (x86 is default), you need a 64bit plugin and JRE.
If you plan to run Firefox/chrome/whatever-other-x86-browser, just use the 32bit.
if you are getting a JDK for development determine what version is appropriate for your IDE or other development tools, and use it.
If you're developing pure Java applications (that is, no C/C++ code linked in) you can eliminate the 32-bit version. The two JRE (Java runtime environment) will work equally as well.
64-bit vs. 32-bit really boils down to the size of object references, not the size of numbers.
In 32-bit mode, references are four bytes, allowing the JVM to uniquely address 2^32 bytes of memory. This is the reason 32-bit JVMs are limited to a maximum heap size of 4GB (in reality, the limit is smaller due to other JVM and OS overhead, and differs depending on the OS).
In 64-bit mode, references are (surprise) eight bytes, allowing the JVM to uniquely address 2^64 bytes of memory, which should be enough for anybody. JVM heap sizes (specified with -Xmx) in 64-bit mode can be huge.
But 64-bit mode comes with a cost: references are double the size, increasing memory consumption. This is why Oracle introduced "Compressed oops". With compressed oops enabled (which I believe is now the default), object references are shrunk to four bytes, with the caveat that the heap is limited to four billion objects (and 32GB Xmx). Compressed oops are not free: there is a small computational cost to achieve this big reduction in memory consumption.
As a personal preference, I always run the 64-bit JVM at home. The CPU is x64 capable, the OS is too, so I like the JVM to run in 64-bit mode as well.
As you note, primitive numeric types in Java are well-defined.
However, the choice between 32-bit and 64-bit JVMs can matter if your Java application is using native-code libraries, which may be built for use in a 32-bit application, a 64-bit application, or both.
If you have native libraries that support only 32-bit applications, you either need to use a 32-bit JVM, or build 64-bit versions of the libraries.