File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Compatibility and versions of java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Compatibility and versions of java" Watch "Compatibility and versions of java" New topic

Compatibility and versions of java

Raghavendra Shockley
Ranch Hand

Joined: Jan 21, 2012
Posts: 69
Will code compiled on a 64 bit OS using 64 bit java run on a 32bit OS using 32 or 64 bit java ?
To what extent is java 7 backward compatible with java 5 and 6 ?

Back to square one.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Java class files have no concept of 32 vs. 64 bit - it makes no difference.

Classes compiled with Java 7 can run on earlier JVM versions provided appropriate -source and -target switches were used, AND the code doesn't use Java 7 features or doesn't use them on earlier JVMs. That's show it has always worked.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15092

Java 7 should be able to run Java code compiled with any older version without modifications, except for minor issues. See Java SE 7 and JDK 7 Compatibility.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Compatibility and versions of java
It's not a secret anymore!