The Abstract Windowing Toolkit Group
This group is chartered with maintaining and enhancing the AWT.
The AWT (Abstract Window Toolkit) provides an interface between a Java application and a native windowing system. AWT comprises the event handling system as well as a set of so-called heavyweight GUI components, including the top-level components such as frames and dialogs. It also has a simple set of widgets for use in situations where next level of more sophisticated GUI tools is not available.
AWT has a very old code base, and has a complicated structure. Parts of the code are intermingled with other low-level parts of JDK such as 2D, i18n, and Input Methods. The majority of the AWT code consists of the directories shown below.
Contains public API thoroughly specified in java.sun.com/javase/6/docs/technotes/guides/awt/index.html. To rebuild after a small change, go to
make/java/awt. The result is a set of classes regularly packed in
Contains API that is more volatile and not well documented. This has traditionally not been considered public API. Generally, an application developer should not use it.To rebuild after a small change, go to
make/sun/awt. Changes here may require rebuilding of classes and certain libraries, for example splashscreen and
Contains low-level implementation of the AWT Toolkits: XToolkit for X Window-based systems, and WToolkit for MS Windows, and also the headless toolkit. Here you will also find code for MToolkit, requiring a proprietary Motif library. However, this is considered obsolete and isn't built as part of OpenJDK. For partial rebuilding you should start from
mawt.sowill be rebuilt in case of changes.
The native parts of the code base are written in C and C++. Most
of the code is platform-specific and resides in the corresponding
Currently only the splashscreen subdirectory is a part of AWT proper.
For small changes made here, you can rebuild from
make/sun/xawt,depending on the platform.
A significant part of this code was used to build MToolkit. Certain parts of it are still in use, however. To rebuild go to
make/sun/awt or make/sun/xawt. Note that some of the code here leads to dead ends!
Contains a native part of XToolkit, AWT Toolkit for X Windows. It's not a large subsection, since most of XToolkit is written in Java. To rebuild go to
A part of the code for MS Windows
Building and Rebuilding
The main result of the AWT building is a version of
mawt.so library in Linux or Solaris, or
awt.dll in MS Windows, and a set of classes.
Additionally, AWT builds the splashscreen library. After you have
completely built OpenJDK, you may modify and recompile parts by
starting from the root of the
make tree. However,
local changes in the AWT code may be recompiled faster from the
following directories depending on your platform:
All fixes must be tested, even seemingly trivial ones. Normally,
one should run all existing related regression tests, and alsso a
dedicated test written particularly for the modified code.
Sometimes an appropriate test may be found in the existing pool of
regression tests in the
test/java/awt subtree. If one
doesn't exist, it's often best to write a new test using a
template, then run it with the
jtreg script. In
general it's better to have an automated test as opposed to on that
needs to be run manually.
Note that in OpenJDK as it is first released, one will not find
many tests in the
test/java/awt area. We are working
on this, however, and eventually we will move most of them from our
work out into the open.
And the final note: remember that AWT should work on as many
platforms as possible. Try not to break linux x86_64 fixing for
- Mailing Lists