3 September 2006

What is in Java 5

Tiger, Tiger Floating LightDid you ever wonder when a particular class was introduced into the JDK? Or did you ever want to get a quick overview of all new classes included in a new release of Java? That is why I maintain my personal list of all public classes together with the JRE's version they were introduced. I started the list in 2002 and have been updating it whenever a new version of Java came out. Now, almost two years after the release of Tiger, it is high time to update my list with Java 5.

Source of Truth
There is only one true source of the contents of a JRE, and that is rt.jar. Getting a plain list of all *.class files inside the archive is not enough because some classes are package accessible and cannot be used in Java code directly. I use a series of shell scripts that generate a text file with all Java classes of rt.jar. After unpacking rt.jar a script iterates all class names and calls javap -public %class% >> access.log for each of them. Stripping all public content from access.log reveals the package accessible classes, e.g.
java.awt.MutableBoolean
java.beans.ReflectionUtils
java.util.JumboEnumSet
java.util.XMLUtils
...
The list of new classes is the list of all classes found in rt.jar minus the package accessible classes, minus all classes of all earlier versions of Java.

Java 5
Tiger adds 172 new public types in the java. name-space. The new classes are
java.awt.datatransfer.FlavorEvent
java.awt.datatransfer.FlavorListener
java.awt.MouseInfo
java.awt.peer.KeyboardFocusManagerPeer
java.awt.peer.MouseInfoPeer
java.awt.PointerInfo
java.beans.IndexedPropertyChangeEvent
java.io.Closeable
java.io.Flushable
java.lang.Appendable
java.lang.Deprecated
java.lang.Enum
java.lang.EnumConstantNotPresentException
java.lang.Iterable
java.lang.Override
java.lang.ProcessBuilder
java.lang.Readable
java.lang.reflect.AnnotatedElement
java.lang.reflect.GenericArrayType
java.lang.reflect.GenericDeclaration
java.lang.reflect.GenericSignatureFormatError
java.lang.reflect.MalformedParameterizedTypeException
java.lang.reflect.ParameterizedType
java.lang.reflect.Type
java.lang.reflect.TypeVariable
java.lang.reflect.WildcardType
java.lang.StringBuilder
java.lang.SuppressWarnings
java.lang.TypeNotPresentException
java.math.MathContext
java.math.RoundingMode
java.net.CacheRequest
java.net.CacheResponse
java.net.CookieHandler
java.net.HttpRetryException
java.net.Proxy
java.net.ProxySelector
java.net.ResponseCache
java.net.SecureCacheResponse
java.rmi.server.RemoteObjectInvocationHandler
java.security.AuthProvider
java.security.CodeSigner
java.security.interfaces.ECKey
java.security.interfaces.ECPrivateKey
java.security.interfaces.ECPublicKey
java.security.KeyRep
java.security.spec.ECField
java.security.spec.ECFieldF2m
java.security.spec.ECFieldFp
java.security.spec.ECGenParameterSpec
java.security.spec.ECParameterSpec
java.security.spec.ECPoint
java.security.spec.ECPrivateKeySpec
java.security.spec.ECPublicKeySpec
java.security.spec.EllipticCurve
java.security.spec.MGF1ParameterSpec
java.security.Timestamp
java.security.UnrecoverableEntryException
java.util.AbstractQueue
java.util.DuplicateFormatFlagsException
java.util.EnumMap
java.util.EnumSet
java.util.FormatFlagsConversionMismatchException
java.util.Formattable
java.util.FormattableFlags
java.util.Formatter
java.util.FormatterClosedException
java.util.IllegalFormatCodePointException
java.util.IllegalFormatConversionException
java.util.IllegalFormatException
java.util.IllegalFormatFlagsException
java.util.IllegalFormatPrecisionException
java.util.IllegalFormatWidthException
java.util.InputMismatchException
java.util.InvalidPropertiesFormatException
java.util.jar.Pack200
java.util.logging.LoggingMXBean
java.util.MissingFormatArgumentException
java.util.MissingFormatWidthException
java.util.PriorityQueue
java.util.Queue
java.util.regex.MatchResult
java.util.Scanner
java.util.UnknownFormatConversionException
java.util.UnknownFormatFlagsException
java.util.UUID
as well as 86 classes of the four completely new packages
java.lang.annotation
java.lang.instrument
java.lang.management
java.util.concurrent
Further there are around 300 new types in javax. packages. The JMX Management Extension 1.2, javax.management, adds more than 170 classes and is a major addition. Further there are several smaller new packages, mainly
javax.jnlp
javax.sql.rowset
javax.xml.datatype
javax.xml.namespace
javax.xml.validation
javax.xml.xpath
i.e. JNLP-Client 1.0 for JavaWebStart, SQL RowSet implementations and several XML functions from JAXP 1.3 like schema mapping, name-spaces, schema validation and XPath.

Full Class List
Here is the complete list of all classes from Java 1.0 to 1.5, to be more precise from Sun's JDK 1.02 and 1.1.8_09, J2SE 1.2.2_13, 1.3.1_08 and 1.4.2_03, and the new Java5 1.5.0_07. This list gets more and more valuable because it becomes more and more difficult to get older JDKs.