Migrating to 1.1 |
JDK 1.0.2 contained eightjava.*
packages:All of these packages remain in JDK 1.1, but use of the interfaces and classes in the
java.applet
java.awt
java.awt.image
java.awt.peer
java.io
java.lang
java.net
java.util
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:
See the next page for information about classes and interfaces that were added to the original eight
java.awt.datatransfer
andjava.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. AClass
object can now return a list of all the public methods and fields of the related class. You can use theMethod
objects returned to invoke methods, and theField
objects to get and set field values. AClass
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 aBigInteger
class provides arbitrary-precision integer arithmetic, andBigDecimal
provides arbitrary-precision decimal arithmetic.java.rmi
,java.rmi.dgc
,java.rmi.registry
, andjava.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
, andjava.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.java.*
packages for 1.1.
Migrating to 1.1 |