Search code examples
javacompatibility

Java x86 compatible with Java ARM?


Can any given Java program written targeting an x86 platform also run on an ARM platform, or will there need to be OS-dependent code written to handle OS-specific functionality?


Solution

  • Yes. The Java runtime environment (JRE) includes a virtual machine which allows for true cross platform software. As long as you aren't using native libraries (or JNI), everything should be truly cross platform. Also, you need to check that the version level of the virtual machine is equivalent for some corner cases.