JDK for Solaris Developer's Guide

Source Compatibility

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:

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).