The Wayback Machine - https://web.archive.org/web/20070516132528/http://openjdk.java.net:80/groups/core-libs/

The Core Libraries Group

This group is comprised of developers who participate in the design, implementation, and maintanence of the Java core libraries.

Introduction

The core libraries consist of classes which are used by many portions of the JDK. The actual set of files has evolved over time, but mostly they include functionality which is close to the VM and is not explicitly included in other areas, such as Security or Networking. Also included are commonly used tools which are either built on top of the core libraries (such as jar) or are used by developers working with them (such as rmic).

Feature Areas

The following table lists the feature areas of the core libraries with their corresponding repository locations and links to other developer documentation. (For documentation targeted for JDK users rather than contributors, see the section End-User Documentation.)

Currently there are some libraries which appear in the name packages as core libraries but are maintained by other groups. These exceptions are mentioned within the corresponding table entries.

Feature AreaRepository LocationsMore Information
java.lang
Provides classes that are fundamental to the design of the Java programming language such as String, Math, Enum, and the wrapper classes for primitive types (e.g. Boolean, Float, Character).

src/share/classes/java/lang
src/share/native/java/lang
src/solaris/classes/java/lang
src/solaris/native/java/lang
src/windows/classes/java/lang
src/windows/native/java/lang
test/java/lang
make/java/java
Threading
Includes basic runtime support for threads.

src/share/classes/java/lang/Thread*.java
src/share/native/java/lang/Thread.c
test/java/lang/Thread*
make/java/java
Process
Includes basic runtime support for creating processes and controlling process I/O.

src/share/classes/java/lang/Process.java
src/share/classes/java/lang/ProcessBuilder.java
src/share/classes/java/lang/Runtime.java
src/share/native/java/lang/Runtime.c
src/solaris/classes/java/lang/*Process*
src/windows/classes/java/lang/*Process*
src/solaris/native/java/lang/*Process*
src/windows/native/java/lang/*Process*
test/java/lang/ProcessBuidler
test/java/lang/Runtime
make/java/java
java.lang.annotation
Provides library support for the Java programming language annotation facility. (These are closely related to the Compiler API and javax.lang.model, which are owned by the Compiler Team.

src/share/classes/java/lang/annotation
src/share/classes/sun/reflect/annotation
java.lang.instrument
Provides services that allow Java programming language agents to instrument programs running on the JVM. These APIs are owned by the Serviceability Team

src/share/classes/java/lang/instrument
src/share/classes/sun/instrument
src/share/instrument
src/solaris/instrument
src/windows/instrument
test/java/lang/instrument
make/java/instrument
java.lang.management
Provides the management interface for monitoring and management of the JVM as well as the operating system on which the JVM is running. These APIs are owned by the Serviceability Team

src/share/classes/java/lang/management
test/java/lang/management
make/java/management
java.lang.ref
Provides reference-object classes, which support a limited degree of interaction with the garbage collector.

src/share/classes/java/lang/ref
src/share/native/java/lang/ref
test/java/lang/ref
make/java/java/
java.lang.reflect
Provides classes and interfaces for obtaining reflective information about classes and objects.

src/share/classes/java/lang/reflect
src/share/classes/sun/reflect
src/share/native/java/lang/reflect
src/share/native/sun/reflect
test/java/lang/reflect
test/java/lang/Class
make/java/java/reflect
java.io
Provides for system input and output and the file system.

src/share/classes/java/io
src/share/native/java/io
src/solaris/classes/java/io
src/solaris/native/java/io
src/windows/classes/java/io
src/windows/native/java/io
test/java/io
make/java/java
Serialization
Supports encoding of objects to and from byte streams.

src/share/classes/java/io/Externalizable.java
src/share/classes/java/io/ObjectInputStream.java
src/share/classes/java/io/ObjectOutputStream.java
src/share/classes/java/io/NotSerializableException.java
src/share/classes/java/io/Serializable.java
src/share/classes/java/io/SerializablePermission.java
src/share/native/java/io/ObjectInputStream.c
src/share/native/java/io/ObjectOutputStream.c
test/java/io/Externalizable
test/java/io/ObjectInputStream
test/java/io/Serializable
make/java/java
serialver
Tool retrieves the serialVersionID for a class.

src/share/classes/sun/tools/serialver
make/sun/serialver
test/java/io/Serializable/serialver
java.nio
Provides buffers to contain data of primitive type.

src/share/classes/java/nio
src/share/classes/sun/nio/ByteBuffered.java
src/share/native/java/nio
src/solaris/native/java/nio
src/windows/native/java/nio
test/java/nio/Buffer
test/java/nio/ByteOrder
test/java/nio/MappedByteBuffer
make/java/nio
java.nio.channels
java.nio.channels.spi
Defines channels, an abstraction for devices capable of performing I/O operations; defines selectors for multiplexed, non-blocking I/O.

src/share/classes/java/nio/channels
src/share/classes/sun/nio/ch
src/share/native/sun/nio/ch
src/share/sample/nio
src/solaris/classes/sun/nio/ch
src/solaris/native/sun/nio/ch
src/windows/classes/sun/nio/ch
src/windows/native/sun/nio/ch
test/java/nio/channels
test/sun/nio/ch
make/java/nio
src/share/sample/nio
make/mksampel/nio
java.nio.charset
java.nio.charset.spi
Defines charsets, decoders, and encoders, for translating between bytes and Unicode characters

src/share/classes/java/nio/charset
src/share/classes/sun/nio/cs
src/solaris/classes/sun/nio/cs
make/java/nio
native2ascii
Tool converts files to and from native encodings.

src/share/classes/sun/tools/native2ascii
test/sun/tools/native2ascii
make/sun/native2ascii
java.util
Provides the collections framework, formatted printing and scanning, array manipulation utilities, event model, date and time facilities, internationalization, and miscellaneous utility classes.

src/share/classes/java/util
test/java/util
make/java/java
Collections
Includes all classes which implement the Collection interface such as data structures implementing lists, queues, maps, and sets.

src/share/classes/java/util/ArrayDeque.java
src/share/classes/java/util/ArrayList.java
src/share/classes/java/util/Collection.java
src/share/classes/java/util/Collections.java
src/share/classes/java/util/*Map.java
src/share/classes/java/util/*Set.java
src/share/classes/java/util/Linked*.java
src/share/classes/java/util/Stack.java
src/share/classes/java/util/Vector.java
test/java/util/ArrayDeque.java
test/java/util/ArrayList.java
test/java/util/Collection.java
test/java/util/Collections.java
test/java/util/*Map.java
test/java/util/*Set.java
test/java/util/Linked*.java
test/java/util/Stack.java
test/java/util/Vector.java
make/java/java
Internationalization Classes
Includes support for internationalization and locale-specific output of dates, times, and currencies. These APIs are owned by the Internationalization Team

src/share/classes/java/util/*Calendar.java
src/share/classes/java/util/Currency.java
src/share/classes/java/util/Date.java
src/share/classes/java/util/Locale*.java
src/share/classes/java/util/ResourceBundle.java
src/share/classes/java/util/*TimeZone*.java
src/share/classes/sun/util/*.java (except PreHashedMap.java)
src/share/classes/sun/util/resources
make/java/java
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
Provides utility classes used in concurrent programming, including support for atomic updates of single variables and a locking framework which supplements language-level synchronization.

src/share/classes/java/util/concurrent
src/share/native/java/util/concurrent
test/java/util/concurrent
make/java/java
java.util.jar
Provides classes for reading and writing the JAR (Java ARchive) file format.

src/share/classes/com/sun/java/util/jar
src/share/classes/java/util/jar
src/share/native/com/sun/java/util/jar
test/java/util/jar
make/java/jar

Not strictly part of JAR, but useful:
src/share/classes/sun/net/www/protocol/jar
src/solaris/classes/sun/net/www/protocol/jar
src/windows/classes/sun/net/www/protocol/jar
test/sun/net/www/protocol/jar
jar
Tool creates and accesses the contents of a .jar file.

src/share/classes/sun/tools/jar
test/tools/jar
make/sun/jar
extcheck
Tool detects conflicts between a target .jar file and the currently installed extension .jar files.

src/share/classes/com/sun/tools/extcheck
make/com/sun/extcheck
java.util.logging
Provides support to maintain and service software at customer sites.

src/share/classes/java/util/logging
src/share/classes/sun/util/logging
test/java/util/logging
make/java/logging
java.util.regex
Provides classes for matching character sequences against patterns specified by regular expressions.

src/share/classes/java/util/regex
make/java/java
java.util.prefs
Provides classes to store and retrieve user and system preference and configuration data.

src/share/classes/java/util/prefs
src/solaris/classes/java/util/prefs
src/windows/classes/java/util/prefs
make/java/java
java.util.spi
Service provider classes for the java.util package. These APIs are owned by the Internationalization Team

src/share/classes/java/util/spi
make/java/java
java.util.zip
Provides classes for reading and writing the standard ZIP and GZIP file formats.

src/share/classes/java/util/zip
src/share/native/java/util/zip
make/java/zip
test/java/util/zip
java.math
Provides classes for performing arbitrary-precision integer arithmetic (BigInteger) and arbitrary-precision decimal arithmetic (BigDecimal).

src/share/classes/java/math
src/share/classes/java/lang/Math.java
src/share/classes/java/lang/StrictMath.java
src/share/classes/sun/misc/FloatConsts.java
src/share/classes/sun/misc/FloatingDecimal.java
make/java/math
java.rmi
java.rmi.activation
java.rmi.dgc
java.rmi.registry
java.rmi.server
Provides support for remote communication between programs written in Java.

src/share/classes/java/rmi
src/share/classes/sun/rmi
test/java/rmi
test/sun/rmi
make/java/rmi
make/sun/rmi
rmic
Tool generates stub, skeleton, and tie classes for remote objects using either the JRMP or IIOP protocols, and generates OMG IDL.

src/share/classes/java/rmi/rmic
test/sun/rmi/rmic
make/java/rmi/rmic
make/sun/rmi/rmic
rmid
Tool starts the activation system daemon that allows objects to be registered and activated in a VM.

src/share/classes/com/sun/rmi/rmid
make/sun/rmi/rmid
rmiregistry
Tool starts a remote object registry on the specified port on the current host.

src/share/classes/sun/rmi/registry
make/sun/rmi/registry
javax.naming
javax.naming.directory
javax.naming.event
javax.naming.ldap
javax.naming.spi
Provides access to Naming and Directory Service such as DNS and LDAP.

src/share/classes/javax/naming
src/share/classes/com/sun/naming
test/javax/naming
make/javax/naming
src/share/classes/com/sun/jndi
test/com/sun/jndi
make/com/sun/jndi
javax.script
Provides interfaces and classes that define Java Scripting Engines and a framework for their use in Java applications.

JDK 6 includes source code for the Mozilla Rhino javascript engine in src/share/classes/sun/org/mozilla/javascript. The .class files for this engine are in rt.jar. The source code has been removed from OpenJDK. In order to use scripting, a JSR 223 compatible scripting engine must be made available on the CLASSPATH.

src/share/classes/javax/script
src/share/classes/com/sun/script
src/share/demo/scripting/jconsole.plugin
src/share/sample/scripting
test/javax/script
make/javax/script
make/com/sun/script
jrunscript
Tool provides a command line script shell both both interactive and batch modes of script execution.

This tool is experimental and unsupported.

src/share/classes/com/sun/tools/script
test/sun/tools/jrunscript
make/sun/jrunscript

Building

Developers are strongly encouraged to perform full builds prior to check-in of any changes. (A full build is a build performed when there is no pre-existing build directory; the workspace should contain only the desired changes and no auto-generated data. Simply performing make at the top of the build tree is not a full build.) Depending on the area, incremental builds are not a reliable indicator of whether or not changes will compile successfully in a full build. In particular, the contents of make/java/java are used early in the bootstrap phase to build components like java.lang.Object, the launcher, and javac that are used to build the rest of the JDK. These are later re-built once sufficient infrastructure has been generated by the bootstrap build. Incremental builds will only catch errors that occur in the compile after bootstrap.

Even when it appears that only java code is being modified, it is prudent to build on multiple platform families. A recommended minimum is one Windows and one Unix target, but depending on the code being modified, it may be necessary to include a wider spectrum or a specific set of platforms. This is necessary because there is no guarantee that the java code which depends on a change in core is identical on all platforms. For instance, rt.jar is not portable—the classes within it vary from platform to platform.

Testing

Tests or modifications of existing tests are required and must accompany all changes (both new functionality and any bug fixes). There are some exceptions. For example, it is not always possible to provide test for fixes for performance problems or other conditions that are difficult to simulate or require unusual environmental conditions (such as exceptionally low memory, system reboot, third-party software, etc.).

In addition to running the new tests, tests in the modified area and any dependent areas should be run. Dependent areas may not be immediately obvious. As with builds, it is necessary to run tests on multiple platforms.

Not all areas have tests in the repository. There are two possible reasons for this. It may be that there are no tests or tests may exist, but have not been audited for open-sourcing. In the latter case, the goal is to add them soon. Please ask about appropriate testing when considering a modification.

End-User Documentation

The following links reference the canonical end-user documentation for the JDK. The features areas listed above will have documentation in the corresponding sections of these references.

Community

close