Java

README: JDK Builds

JavaTM Platform, Standard Edition Development Kit (JDK)

v7 ea

            

Introduction

This README file contains build instructions for the JavaTM Platform, Standard Edition Development Kit v7 (JDK 7) Community Source Release. Building the source code for the JDK requires a high level of technical expertise. Sun provides the source code primarily for technical experts who want to conduct research, port the platform to new operating systems and hardware, or add enhancements that require access to platform internals. If you are not a technical professional in one of these categories, this release is probably not for you.

Throughout this document there will be references to the OpenJDK7 README-builds.html file. In general, many of the build instructions are the same as the OpenJDK instructions, where these instructions are the same the above OpenJDK reference will be made instead of repeating the same instructions.


Contents


Source Directory Structure

See the OpenJDK directories information for the basic source directory structure.
Additional source directories not in the OpenJDK are: deploy (containing plugins and java webstart) and install (containing the formal installation bundle creation).

Building

See the OpenJDK building information for basic build instructions.
The additional sources just add to the build and in general do not change the overall build process.

GNU make

See the OpenJDK GNU make build information.

Windows

See the OpenJDK Windows information and the OpenJDK Windows Check List. The OpenJDK Binary Plugs and FreeType fonts are not necessary. The complete check list is then:
  1. Install or check OS version.
  2. Install CYGWIN.
  3. Install the Bootstrap JDK.
  4. Install the Microsoft Visual Studio Compilers
  5. Install the Microsoft Platform SDK.
  6. Setup all environment variables for compilers (see compilers).
  7. Install Microsoft DirectX SDK.
  8. Install Ant, set ANT_HOME.
  9. i586 only:
    1. plugin only: Get the Mozilla Headers.
    2. If creating install bundles, install Microsoft Installer SDK and Microsoft Installer MsiVal2.

Windows Paths

See the OpenJDK Windows Paths information.

Linux

See the OpenJDK Linux information and the OpenJDK Linux Check List. The OpenJDK Binary Plugs and FreeType fonts are not necessary. The complete check list is then:
  1. Install or check OS version.
  2. Install Bootstrap JDK.
  3. Install ALSA packages.
  4. Install CUPS files.
  5. Install Ant, should be in your PATH.
  6. i586 only:

Solaris

See the OpenJDK Solaris information and the OpenJDK Solaris Check List. The OpenJDK Binary Plugs and FreeType fonts are not necessary. The complete check list is then:
  1. Install or check OS version.
  2. Install Bootstrap JDK.
  3. Install Sun Studio Compilers.
  4. Install CUPS files.
  5. Install Ant, set ANT_HOME.
  6. plugin only: Get the Mozilla Headers.

Build Dependencies

See the OpenJDK Build Dependencies information. The complete list of build dependencies is: Additional build dependencies or build dependency information is provided below.

zip and unzip

See the OpenJDK Zip and Unzip information.
Solaris: unzipsfx
unzipsfx is required for creation of Solaris installation bundles only.

Mozilla Header Dependencies (for the 32-bit plugin only)

32-bit plugin only: The Mozilla plugin is currently only built for the 32-bit platforms. These files are only required for building the Java Plug-in. If you do not need to build Java Plug-in, the headers and libraries are not required.

Since Netscape 7 has been widely adopted, we decided to stop building OJI plugin for Netscape 6.x in JDK release. As a result, the JDK build requires set of header files as shown below. Download the Mozilla Header files from www.java.net/download/jdk6. To unpack the jar file do not run jar on it, just execute it with java -jar file.jar then place the headers and libraries into a directory similar to the one shown below. Finally, set the ALT_MOZILLA_HEADERS_PATH variable to the absolute path of the plugin directory.

Mozilla Plugin Needs gcc 2.9 Compiler

plugin only:

Solaris 32-bit only: GNU gcc version 2.95.2 is required for building the Mozilla Plug-in on Solaris. The source code for gcc is available from www.gnu.org/software/gcc/, and some pre-built binaries are available from sunfreeware.com. Set ALT_GCC_COMPILER_PATH to point to the location of the gcc bin directory.

Linux 32-bit only: To support Mozilla compiled with gcc egcs 2.91.66 on Linux platform, you MUST build the OJI Plug-in library using GNU gcc/g++ compiler version egcs 2.91.66. Unfortunately you have to do this without causing anything else to be built with this compiler, so this is tricky. If you can avoid building the plugin, you need not worry about this. If someone already has this compiler on a system, you should probably just set ALT_GCC29_COMPILER_PATH otherwise there are two ways to do this:

Windows Specific Dependencies

Unix Command Tools
The JDK requires access to a set of command tools on Windows supplied by CYGWIN.
Microsoft Installer SDK
Only needed if creating install bundles: When you install the Platform SDK, make sure the the Windows Installer files are also installed.
Microsoft MsiVal2
Only needed if creating install bundles: The MsiVal2 is available from the Microsoft Windows Installer SDK component of any recent Microsoft Platform SDK. To obtain MsiVal2 files, you must double click on the MsiVal2.msi in the bin directory of the Platform SDK. Select "Custom" install type, and install into the %SYSTEMDRIVE%/Program Files/MsiVal2 directory.

Creating the Build

See the OpenJDK Creating the Build information.

Testing the Build

See the OpenJDK Testing the Build information.

Environment/Make Variables

See the OpenJDK Environment/Make Variable information.

Other environment or make variables not currently used by the OpenJDK are:

ALT_MOZILLA_HEADERS_PATH
plugin only: The location of the Mozilla Header files. See Mozilla Headers for more information. The default location is $(ALT_JDK_DEVTOOLS_PATH)/share/plugin
ALT_GCC_COMPILER_PATH
plugin only: The location of the GNU C compiler and tools, for building the Plug-in. See Mozilla Plugin Needs gcc 2.9 Compiler for details.
ALT_GCC29_COMPILER_PATH
plugin only: An override for specifying the location of the gcc 2.9 compiler. See Mozilla Plugin Needs gcc 2.9 Compiler for details.
ALT_GCC29_PLUGIN_LIB_PATH
plugin only: An override for specifying the location of the OJI Plug-in library compiled with gcc 2.9. See Mozilla Plugin Needs gcc 2.9 Compiler for details.
Windows specific:
ALT_INSTALL_MSSDK
Only needed if creating install bundles: The location of the Microsoft Installer SDK. The default will be to use %SYSTEMDRIVE%/Program Files/Microsoft Platform SDK.
ALT_INSTALL_MSIVAL2
Only needed if creating install bundles: The location of the Microsoft MsiVal2. The default will be to look in %SYSTEMDRIVE%/Program Files/MsiVal2.
Security specific:
SECURITY_BASELINE_142
The version corresponding to the latest publicly available JRE 1.4.2 update release (e.g. "1.4.2_10").
SECURITY_BASELINE_150
The version corresponding to the latest publicly available JRE 1.5.0 update release (e.g. "1.5.0_02").
SECURITY_BASELINE_160
The version corresponding to the latest publicly available JRE 1.6.0 update release (e.g. "1.6.0_02").

Troubleshooting

See the OpenJDK Troubleshooting information.

Copyright 2008 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

Sun