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.

Windows MKS: Builds

Currently this build can be done on Windows with either CYGWIN or MKS. MKS is not even mentioned in the OpenJDK build documentation and it's use will only be documented in this README file.

GNU make

See the OpenJDK GNU make build information.

Windows MKS: Building GNU make

On Windows and using the MKS toolkit, you will need a GNU make built for MKS and you should start the build from an MKS shell window. To build GNU make for MKS:

  1. Download the sources from ftp.gnu.org/pub/gnu/make/.
  2. In an MKS shell command with the compiler cl in your path run: ./configure CC=cl ; nmake -f NMakefile
  3. The resulting GNU make should be WinRel/make.exe.

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 MKS or CYGWIN. If MKS, you will need a GNU make, zip, and unzip.
  3. Install the Bootstrap JDK.
  4. Install Microsoft Visual Studio .NET 2003 and/or Microsoft Platform SDK.
  5. Setup all environment variables for compilers (see compilers).
  6. Install Microsoft DirectX SDK.
  7. Install Ant, set ANT_HOME.
  8. 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.
Windows MKS: Paths

When using MKS the utility dosname has a -s option that will provide the translation of Windows paths to the style "C:/" without spaces and using "/" instead of "\" path separators.


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, set ANT_HOME.
  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 Solaris system patches.
  4. Install Sun Studio Compilers.
  5. Install CUPS files.
  6. Install Ant, set ANT_HOME.
  7. 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.
Windows MKS: zip and unzip
If you are using MKS Toolkit, then you need MKS built versions of ZIP.EXE and UNZIP.EXE installed in ALT_DEVTOOLS_PATH.
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 the MKS Toolkit or CYGWIN. Note that the build environment must be pure MKS or pure CYGWIN. An MKS build cannot necessarily use CYGWIN binaries and a CYGWIN build cannot use the MKS Shell, binaries or GNU Make built for MKS.
MKS Toolkit:
The 32-bit JDK build requires MKS Toolkit version 8.7 or later, older versions of MKS may work but they are not recommended. Information about the MKS Toolkit can be obtained from the MKS website at www.mks.com. If the binaries are not installed in %SYSTEMDRIVE%\mksnt\ for 32-bit and %SYSTEMDRIVE%\mksnt\mksnt for 64-bit, set the ALT_UNIXCOMMAND_PATH variable to their location.

If MKS is installed into a Path that contains spaces, it will be necessary to set ALT_UNIXCOMMAND_PATH to identify that location using Microsoft Mangled Path Name conventions. For example, if the MKS command are located in %SYSTEMDRIVE%\Program Files\MKS Toolkit\mksnt, then ALT_UNIXCOMMAND_PATH should be set to %SYSTEMDRIVE%\Progra~1\MKSToo~1\mksnt (or whatever mangled name setting is appropriate for your installation). You can use the DOS command DIR /x as an aide in determining the mangled path and file names.

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