Java JDK 32 bit vs 64 bit

I am creating a fairly simple application that reads and displays text files and views them.

I ask myself if I have an interest in offering the user a 32- and 64-bit version.

The only difference is that there is access to more heaps of memory with a 64-bit version, or is there any other interest?

Will a 32-bit compiled program run on a 64-bit JVM (I assume yes)

+7
source share
2 answers

The only differences between 32-bit and 64-bit builds of any program are the size of machine words, the amount of address memory and the ABI operating system used. With Java, a language specification means that differences in machine word size and OS ABI should not matter at all if you are not using native code. (Parent code should be built in the same way as the size of the JVM word that will load it, you cannot mix 32-bit and 64-bit assemblies in the same process without very exotic coding, and you should not "do this with Java.)

+12
source

The only thing that smeared me was when my native libraries were involved, which pushed him one way or another. If you are just on Earth Java, then realistic, if you do not need> 4 GB of heap size, there are very few differences.

EDIT: The differences include things like it uses a little more memory than 32 bits, significantly more if you use the version prior to 6u23 and not use -XX:+UseCompressedOops . There may also be a slight difference in performance between the two, but again nothing big.

+2
source

All Articles