Welcome To Java Library !

Java Library Packages, Instructor Jeff Zhuk

Most of Java (all excluding the primitive data types) is a collection of classes and a set of keywords and syntax to manipulate and use those classes. There are several classes that belong to Java, so the language is broken down into several packages.

List of Packages and API

       package java.applet 
       package java.awt 
       package java.awt.datatransfer 
       package java.awt.event 
       package java.awt.image 
       package java.awt.peer 
       package java.beans 
       package java.io 
       package java.lang 
       package java.lang.reflect 
       package java.math 
       package java.net 
       package java.rmi 
       package java.rmi.dgc 
       package java.rmi.registry 
       package java.rmi.server 
       package java.security 
       package java.security.acl 
       package java.security.interfaces 
       package java.sql 
       package java.text 
       package java.util 
       package java.util.zip 

Java.applet

The java.applet package contains the Applet class and three related interfaces. Applet is the superclass of all applets. An applet is a Java program that can be executed over the internet via a Java enabled browser. An application which does not extend Applet is a stand alone application that can be executed from the command line through a Java interpreter. An application needs to supply a main() method to execute.

Applet Classes and Interfaces

Classes

Interfaces

Java.awt

The java.awt package is the Abstract Windowing Toolkit. There are roughly three categories of classes in the awt package.

The java.awt.image package is used to support image processing. This package is not the source of images.

The java.awt.peer package consists entirely of interface definitions. The only time the interfaces in peer are implemented is when you are porting to a new platform.

The java.awt.datatransfer package introduced first in Java 1.1. It is responsible for data serialisation. The package brings The Clipboard/Drag-andDrop mechanism to Java. (Drag-and-Drop portion will be released later this year.)

The java.awt.event package structure system events into different categories. It helps to introduce the Delegation Event Model allowing to separate GUI from Event processing.

awt categories

Graphics colors, fonts, images ...

Components buttons, menus, lists ...

LayoutManagers controls layout of components in containers

The awt is discussed in more detail in a later chapter.

java.beans

JavaBeans extends Java's "write once - run everywhere" capability to reusable component development. In fact, JavaBeans takes interoperability a major step forward -- code runs on every OS and also within any application environment. A Beans developer secures a future in the emerging network software market without losing customers that use proprietary platforms, because JavaBeans interoperate with ActiveX, OpenDoc, and LiveConnect.

java.io

java.io is used for both screen and file input / output. Java applets can not use file io for security reasons.

io Classes and Interfaces

Classes

Interfaces

java.lang

java.lang has the classes that are more central to the language. Most of the classes are separate and have no direct relationship with one another.

The Thread class is a very powerful class that separates Java from many other languages.

lang Classes and Interfaces

Classes

Interfaces

java.lang.reflect

The package provides a small type-safe and secure API supporting introspection about the classes and objects in the current Java Virtual Machine. The reflection API consists of three new classes:
Field, Method and Constructor that reflects class and interface members and constructors; means provides reflecting information.

New methods of Class and two new classes Byte and Short in the java.lang package also supports reflection.

java.Math

The package includes BigDecimal and BigInteger classes expanding Java capabilities for basic arithmetic, scale manipulation, comparison, format conversion and hashing.

java.net

The java.net package provides different ways to communicate over the network. URL, Socket and Datagrams are the primary classes for network communication.

net Classes and Interfaces

Classes

java.rmi, java.rmi.dgc, java.rmi.registry and java.rmi.server

The packages serves for Remote Method Invokation procedures. FYI: DGC=Distributed Garbage Collection.

java.security, java.security.acl and java.security.interfaces

The packages serve to provide secure Java operations, allows use signed Applets. FYI: ACL is Access Control List.

java.sql

The package represents former JDBC - Connecting Java and Databases.

java.text

The package expands AWT text field and text area classes allowing more control over the text format and context.

java.util and java.util.zip

java.util.zip package allows to use a popular "ZIP" compressed files.

java.util contains several useful classes that many of the Java classes depend on. Date, Vector and Hashtable are just some of the most frequently used classes.

util Classes and Interfaces

Classes

Interfaces

Back To Java School