• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New features of Tiger

 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, with all the new features in Tiger, I'm just wondering if my codes would still be backward compatible with 1.4 or earlier or not.

For example, autoboxing. Will this still works in 1.4? Or will i get an exception?

Thanks
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java code is not backwards compatible.
If you use Tiger specific features in your code you will be unable to compile to a classfile format earlier than 1.5.0 which means you cannot run your class against an older JVM.
Classes compiled against an older compiler version will run on Tiger (usually, there may be exceptions if those classes use keywords new in Tiger for for example methodnames just like classes using 'assert' as an identifier name cannot be used with a 1.4 or later JVM).
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I read "backwards compatible", I think "code written in 1.4 can be run on a 1.5 JVM". However, the question seems to suggest the other way around: code written in 1.5 can be run on a 1.4 JVM. As Jeroen says, this isn't possible. The correct terminology, I think, is that Java is not *forward* compatible. In fact most software isn't.

-Layne
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I remember in 1.4 we have assertions which were by default turned off, thus, making it forward compatible. Was just wondering if the newer features in Tiger could also work the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic