README
Java® 2 SDK, Standard Edition
Community Source Release


Contents

Introduction
Contents of the Source Release
Building the Source Release
Using the SDK
Troubleshooting Build Problems
Building Other Targets
Updates and errata to this README will be made available on-line.

Introduction

Welcome to the first release of the buildable source code for the Java® 2 SDK. This source code is provided as part of the Sun Microsystems Community Source Licensing program. The new licensing model: Please see the Sun Community Source License on the Sun website for full details about the provisions and requirements of the new licensing program:
Sun Community Source License

This community source release contains all the source code and makefiles required for building the Java 2 SDK. By following the build instructions below, you can generate the Java virtual machine, class libraries for the platform API, and development tools that you would find in the Java Software releases of the Java 2 SDK binaries.

The next section describes the contents of the Java 2 Community Source Release. You can review that first, or jump straight to the build instructions. After you've successfully completed a build, you can refer to the section on Using the SDK for information about where to find and how to use the binary files that are produced by the build.

Contents of the Community Source Release

The source release contains five top-level directories.

The build directory
The build directory contains the makefiles that are needed for building the SDK. Make files that are shared between Solaris and Win32 platforms are contained in the build/share directory. Solaris-specific makefiles are in the build/solaris directory, and Win32-specific makefiles are in the build/win32 directory. The build/solaris directory contains makefiles for building both the SPARC and x86 versions of the Solaris SDK.

The ext directory
This directory contains the source code and makefiles for building the auxiliary libraries that are included with the SDK. These libraries are the internationalization library (bundled as i18n.jar in the SDK) and the Internet-Intranet Input Method Protocol standard extension (bundled as iiimp.jar in the SDK).

The src directory
This directory contains the C and Java language source code for building the SDK. As with the build directory, it contains share, solaris, and win32 directories for shared files, Solaris-specific files, and Win32-specific files.

Building the Source Release

Building the community source release involves running the makefile scripts that compile the source code and generate the libraries and tools that comprise the Java 2 Standard Edition SDK. After building the release, you'll have everything that ships as part of the SDK as you'd download it from the Java Software website.

You can build three versions of the SDK with this community source release:

If you're on a Solaris platform, the Solaris-specific makefiles will automatically determine whether they're running on a SPARC machine or on an x86 machine and build the appropriate version. Therefore, only two sets of build instructions are required:

Build instructions for the Win32 version of the SDK

You need to perform the build on a Windows NT 4.0 platform. After the build is completed, you can run the binaries on any Win32 operating system. The minimum recommended hardware for building the Win32 version is a PC with a Pentium class processor and 128 megabytes of RAM.

Pre-build requirements

You must satisfy these requirements before you can build the Win32 version of the SDK:

Building the SDK

Once you've met the pre-build requirements, there are only a few simple steps to follow to do the build.

  1. Change to the build\win32 directory of the source release. For example if your source release is installed in C:\jdk1.2-src:
    cd C:\jdk1.2-src\build\win32
    

  2. Launch the build process by entering this at the command prompt:
    nmake world
    
    You can expect the build to take as long as one or more hours, depending on your system hardware.
If you do subsequent builds, it's a good idea to first remove all the files that were produced by the previous build. The makefiles will do this for you if you run this command from the build\win32 directory:
nmake world-clobber

Build instructions for the Solaris versions of the SDK

The Solaris makefiles will automatically determine whether they're running on a SPARC machine or on an x86 machine and build the appropriate version of the SDK. You can follow these build instructions on either Solaris-SPARC or Solaris-x86. You can do the build on Solaris 2.5.1 or Solaris 2.6. The minimum recommended hardware for building the Solaris-SPARC version is an UltraSPARC with 128 megabytes of RAM. For building the Solaris-SPARC version, a Pentium class processor or better and at least 128 megabytes of RAM are recommended.

Pre-build requirements

You must satisfy these requirements before you can build a Solaris version of the SDK:

Building the SDK

Once you've met the pre-build requirements, you can start the build with a few simple steps.

  1. Change to the build/solaris directory of the source release. For example if your source release is installed in /java/jdk1.2-src:
    cd /java/jdk1.2-src/build/solaris
    

  2. Launch the build process by entering this at the command prompt:
    gnumake world
    
    You can expect the build to take as long as one or more hours, depending on your system hardware.
If you do subsequent builds, it's a good idea to first remove all the files that were produced by the previous build. The makefiles will do this for you if you run this command from the build/solaris directory:
gnumake world-clobber

Using the SDK

New directories are created when you successfully build any version of the SDK.

The bin directory
You'll find this directory inside the directory from which you started the build, either build\win32 on Win32 platforms or build/solaris on Solaris platforms. The bin directory contains all the executable files for the SDK development tools that are created during the build. Both optimized and debug versions of the tools are produced. These tools include the java interpreter, the javac compiler, and the other tools of the SDK. Put the bin directory on your path to use the tools you've built. Documentation for using these tools is available on the Java Software website

The lib directory
This directory is created at build\win32\lib on Win32 platforms and at build/solaris/lib on Solaris platforms. It contains libraries used by the Java 2 Standard Edition platform. This libraries include i18n.jar for internationalization support, font properties files, the ext directory containing the iiimp.jar standard extension and other resources used by the Java platform.

The classes directory
This directory contains bytecodes (.class files) for all Java source code that was compiled during the build. It's contents correspond to the files contained in the SDK's rt.jar file.

Other directories containing compiled bytecodes are created within the directory structure beneath the top-level ext directory.

Once the community source release is built, you can use the resulting SDK much as if you were using the Java 2 Standard Edition platform that you can download and install in binary form. Complete documention for the Java 2 SDK is available on the Java Software website

Troubleshooting Build Problems

A build can fail for any number of reasons. If you can't determine what's causing the problem, go back through the list of pre-build requirements to see if they're all met. Check that you don't have the CLASSPATH and JAVA_HOME environment variables set. If you've built the source before, make sure that you've done a "clobber" before building again. To clobber on Win32, issue this command from the build\win32 directory:
nmake world-clobber
On Solaris, issue this command from the build/solaris directory:
gnumake world-clobber

Here are a few error messages that can result if something goes awry during a build. Beneath each message is a brief explanation of what might be the cause of each problem.

Building Other Targets

In addition to the makefiles for building the Java 2 Standard Edition SDK, the community source release contains makefiles for building other sets of binaries and files. The following list shows some of the build "targets" for which makefiles exist in the source release. To build any of these targets, go to the build\win32 directory on Win32 platforms or the build/solaris directory on Solaris platforms and run this command:
On Win32: nmake <target>
On Solaris: gnumake <target>
In these commands, <target> stands for world, all or any other target described in the following list.
world
This is the target for the full SDK. This target is a combination of the all and ext targets.
all
This target builds the optimized and debug versions of the Java 2 Standard Edition platform, without building any extensions.
ext
This generates optimized and debug versions of extensions.
releasedocs
This target uses the Javadoc utility to generate HTML-formatted API documentation for the public platform API. The build places this documentation in the bin/doc/api directory.
release-images
This target produces complete copies of both the Java 2 SDK and the Java 2 runtime environment exactly as they would appear if the SDK and JRE binaries were downloaded from the Java Software website and installed.

Copyright © 1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303-4900 USA. All rights reserved.