Java 32-bit vs 64-bit compatibility

mshafrir picture mshafrir · Apr 23, 2009 · Viewed 112.3k times · Source

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.

Answer

Zifre picture Zifre · Apr 23, 2009

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