I have a jar but I don't know if it is a .jar
for a 64bit system or for a 32bit system. How to find that out?
EDIT: My .jar
has native library dependency.
Yes, you can have both x64 bit and x32 bit Java installed. They won't create conflicts with with each other, as they're tied to the type of browser you're using.
That's all about the difference between 32-bit and 64-bit JVM in Java. As you have seen, the key difference comes in how much memory you can allocate, while 32-bit JVM can just have 4G which is very less for modern, memory-intensive Java application, 64-bit JVM virtually gives you unlimited memory.
64 bit gives much better performance in most apps and it shouldn't matter if the launching program is 32 bit, it can still run the 64 bit java. @AthomSfere, minecraft for one, recommends using a 64 bit java runtime if you want to enable the highest graphics modes as the performance is too slow under 32 bit.
Java bytecode is java bytecode, it doesn't matter whether it was built with a 32-bit or 64-bit JDK and there is no way to figure this out.
I think it does not make any difference to have a jar compiled with 32-bit or 64-bit. It should be machine-independent; unless you have some native library dependency or the java code is directly being compiled to native code.
A pure jar is not compiled to a particular architecture.
A 32 bit JVM will run the jar in 32 bit, likewise a 64 bt JVM will run the jar in 64 bit.
Of course, if your jar uses native libraries then the 'bitness' of these will have to match the JVM that you use to run the jar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With