The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: JDK(TM) 1.1 -- And Beyond!
Lesson: Migrating to 1.1

## Packages New for 1.1

> JDK 1.0.2 contained eight `java.*` packages, which remain in JDK 1.1:
> - `java.applet`
> - `java.awt`
> - `java.awt.image`
> - `java.awt.peer`
> - `java.io`
> - `java.lang`
> - `java.net`
> - `java.util`

> For JDK 1.1, fifteen new packages were added to the original eight. They are:

> - `java.awt.datatransfer`-Contains classes and interfaces that implement a clipboard for transferring data.
> - `java.awt.event`-Contains listeners and event type for event handling.
> - `java.beans`-JavaBeans are software components that allow unrelated developers to write and ship Java components that can be composed together by end-user tools.
> - `java.lang.reflect`-This package provides a reflection mechanism for Java. This is a tool for examining classes fully. A `Class` object can now return a list of all the public methods and fields of the related class. You can use the `Method` objects returned to invoke methods, and the `Field` objects to get and set field values. A `Class` object can also return a list of all members, including non-public ones, but security restrictions usually prevent this.

>   You should avoid the temptation to use reflection when other tools more natural to the language would suffice. If you are accustomed to using function pointers in another language, for example, you might think that using `Method` objects are a natural replacement, but usually an object-oriented tool-such as an interface that is implemented by objects that perform the needed action-is better. Reflection is intended for use by language tools such as debuggers and class browsers.

> - `java.math`-This package provides tools for mathematical manipulations. Currently a `BigInteger` class provides arbitrary-precision integer arithmetic, and `BigDecimal` provides arbitrary-precision decimal arithmetic.
> - `java.rmi`, `java.rmi.dgc`, `java.rmi.registry`, and `java.rmi.server`-Remote Method Invocation (RMI) allows you to create objects whose methods can be invoked by objects running in other Virtual Machines, including Virtual Machines running on other hosts. Because Java code can be downloaded and run securely, RMI lets you pass subtypes of the declared method parameters, and return subtypes of the declared type of the remote method. This allows you to pass object behavior as well as simple values. RMI provides remote procedure calls with a Java flavor and benefits.
> - `java.security`, `java.security.acl`, and `java.security.interfaces`-This package and its subpackages provide some basic interfaces and classes for security-related operations, such as authentication, authorization, signed data, and encryption.
> - `java.sql`-This package provides tools for using relational databases.
> - `java.text`-This package provides text internationalization tools, such as date parsing and number formatting.
> - `java.util.zip`-You can use these classes for handling ZIP files.
> See the next page for information about classes and interfaces that were added to the original eight `java.*` packages for 1.1.

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Copyright 1995-2001 Sun Microsystems, Inc. All rights reserved.