Compatibility with Previous Releases
Incompatibilities in the Java 2 Platform Standard Edition 5 (since 1.4.2)
Downward source compatibility is not supported. If source files use new language features or Java 2 Platform APIs, they will not be usable with an earlier version of the Java platform.
In general, the policy is as follows, except for any incompatibilities listed further below:
Maintenance releases (such as 1.4.1, 1.4.2) do not introduce any new language features or APIs, so they maintain source-compatibility with each other.
Functionality releases and major releases (such as 1.3.0, 1.4.0, 1.5.0) maintain upwards but not downwards source-compatibility.
Deprecated APIs are interfaces that are supported only for backwards compatibility. The javac compiler generates a warning message whenever one of these is used, unless the -nowarn command-line option is used. It is recommended that programs be modified to eliminate the use of deprecated APIs, though there are no current plans to remove such APIs, with the exception of JVMDI and JVMPI entirely from the system. (Refer to bug 4639363.)
Some APIs in the sun.* packages have changed. These APIs are not intended for use by developers. Developers importing from sun.* packages do so at their own risk. For more details, see, Why Developers Should Not Write Programs That Call sun.* Packages (at http://java.sun.com/products/jdk/faq/faq-sun-packages.html).