Previous Page Next Page Start of Tutorial > Start of Trail > Start of Lesson Lesson Contents

Trail:
To 1.1 -- And Beyond!
Lesson:
Migrating to 1.1



Help on searching
is available.

Search technology
by Excite, Inc.

Packages New for 1.1

JDK 1.0.2 contained eight java.* packages:
  • java.applet
  • java.awt
  • java.awt.image
  • java.awt.peer
  • java.io
  • java.lang
  • java.net
  • java.util
All of these packages remain in JDK 1.1, but use of the interfaces and classes in the java.awt.peer package is discouraged [PENDING: get better wording from Kathy].

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

  • java.awt.datatransfer and java.awt.event-[PENDING]
  • 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.
 
Previous Page Next Page Start of Tutorial > Start of Trail > Start of Lesson Lesson Contents