Java – Can a .class file generated using a 32 bit java compiler be used on a 64 bit system with 64 bit JVM

javajvm

Can a .class file generated using a 32 bit java compiler be used on a 64 bit system with 64 bit JVM?

Best Answer

Yes. Java byte code is independent from 32/64/... bit systems.

That's the main purpose: the compiled code shall be executable on any system, just the virtual machine is compiled for a special system architecture.