Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 32-bit vs 64-bit compatibility

Will Java code built and compiled against a 32-bit JDK into 32-bit byte code work in a 64-bit JVM? Or does a 64-bit JVM require 64-bit byte code?

To give a little more detail, I have code that was working in a Solaris environment running a 32-bit JVM, but now I'm getting issues after upgrading the JDK and Weblogic Server to 64-bit.

like image 334
mshafrir Avatar asked Apr 23 '09 21:04

mshafrir


People also ask

Can 32 bit and 64 bit Java coexist?

Yes, it is absolutely no problem. You could even have multiple versions of both 32bit and 64bit Java installed at the same time on the same machine.

Should I install 32 or 64 bit Java?

Which versions of java you should install on 32-bit/64-bit machines? Strictly speaking, on a 32-bit CPU architecture machine, you should install 32-bit java/JRE. On the other hand, on a 64-bit CPU architecture machine, you are free to choose between 32-bit java/JRE and 64-bit java/JRE. Both will work just fine.

Do I need both 32 bit and 64 bit Java?

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.

Can 32 bit Java run on 64 bit Windows?

However you cannot run 64bits program if your OS and IE belong to a 32bit architecture. Also you will not be able to install programs belonging to both bits on the same laptop. This will make the 32bit Java run but will not work for 64. Was this reply helpful?


1 Answers

Yes, Java bytecode (and source code) is platform independent, assuming you use platform independent libraries. 32 vs. 64 bit shouldn't matter.

like image 128
Zifre Avatar answered Oct 23 '22 02:10

Zifre