File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes New features of Tiger Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "New features of Tiger" Watch "New features of Tiger" New topic
Author

New features of Tiger

Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
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


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
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).


42
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
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


Java API Documentation
The Java Tutorial
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New features of Tiger