This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Compatibility and versions of java" Watch "Compatibility and versions of java" New topic
Author

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
Marshal

Joined: Mar 22, 2005
Posts: 41591
    
  55
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.


Ping & DNS - my free Android networking tools app
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14114
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compatibility and versions of java