Should I use classes in the sun.* packages?

John Zukowski

While you can technically use those classes, they are completely unsupported and can change between Java releases.

The java.* packages are the official, supported Java APIs (with the javax.* packages official, supported, extension APIs).

In addition, if you (or your users) are using a JVM implementation from someone other than Sun, the classes may not even be available.