Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: basic config issue (multiple part question)



Anthony Magee wrote:

>>but I am concerned about compatability issues (
>>which
>>using the scanner class in school forced me to>
>>upgrade
>>to 1.5 at home) are then any I should be aware of?
>
>Unless you are using JNI there should be no differences noticeable. This is
>expected of java: to behave the same on every system.

I think this needs clarification.

When moving an existing Java program (compiled or in source) to a LATER
Java release, compatibility is usually very high.  In most cases, no
changes will be needed, and the Java program will continue to work.  Sun
usually notes in the release notes when this compatibility has been broken.
It happens rarely, but it does happen, usually with a few lesser-used
methods of a class.

When moving an existing Java program to an EARLIER release, there are NO
compatibility promises.  Depending on what classes were used, there might
be a fatal error, such as a program that used the java.util.Scanner class,
or one which relied on J2SE 5.0's generics.

Going backwards may also require a recompile, even if the program does not
use any classes or features unique to the later release. This is because
class-files contain a version-number, and an earlier JVM won't recognize
later versions:
   <http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html>
  <http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version_p.html>

Also see "Binary Compatibility" in the Java Language Spec:
  <http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html>
  <http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html>


There are also portability issues arising from the lack of "bug-for-bug
compatibility" across releases or platforms.  Something that works on one
platform may fail completely on another, or it may have minor cosmetic
defects.  Or, it may work perfectly fine except in certain configurations
of a platform, such as with or without a particular piece of hardward.


"Write Once, Run Anywhere" is a worthy and frequently achievable goal, not
a fundamental guarantee.  It may take some careful dedicated work, more
like "With liberty and justice for all" than "Pay to the bearer the sum of".

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.