|
Windows Build Instructions
JavaTM 2 Platform Standard Edition, v6 beta2
|
Build Overview |
Contents
- Introduction
- Windows System Setup
- Windows Build Tools and Libraries Setup
- Windows Build Environment Variables
- Windows Build
Introduction
This README file contains build instructions for the JavaTM 2 Platform Standard Edition, v6 (JDK 6) 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.Windows System Setup
Windows i586: The official 32-bit build platform for the JDK 6 is Windows Professional 2000 with Service Pack 4. The minimum recommended hardware for building Windows-i586 version is an Pentium class processor or better, at least 512 MB of RAM, and approximately 600 MB of free disk space.Windows amd64:The official 64-bit (amd64) build platform for the amd64 Windows JDK 6 is Windows Server 2003 - Enterprise x64 Edition. The minimum recommended hardware for building the Windows-amd64 version is an AMD Opteron class processor, at least 1 GB of RAM, and approximately 10 GB of free disk space.
Windows Build Tools and Libraries Setup
Once the Windows OS is set up, you will need to install additional tools and libraries for building the JDK.Microsoft C++ Compiler
Windows i586: The 32-bit JDK build requires Microsoft Visual Studio.NET 2003 (VS.NET 2003) Professional Edition compiler. The compiler and other tools are expected to reside in the location defined by the variable VS71COMNTOOLS which is set by the Microsoft Visual Studio.NET installer.It is highly recommended that you run VCVARS32.BAT (usually found in C:\"Program Files"\"Microsoft Visual Studio .NET 2003"\Vc7\bin\VCVARS32.BAT) to set MSVCDIR, INCLUDE, LIB, and the PATH prior to building the JDK. If your compiler resides in a place other than the default, you can set ALT_COMPILER_PATH to point to the location of the cl compiler binary.
Windows amd64: The Microsoft Platform Software Development Kit (SDK), April 2005 Edition compiler, is required for building the JDK. You will need to minimally install the Core SDK and the MDAC SDK features of this compiler.
The compiler and other tools are expected to reside in the locations defined by the variables MSSdk and MSTools, which are set by the setup utility SetEnv.Cmd /X64 (usually found in C:\Program Files\Microsoft Platform SDK\). It is required that you run SetEnv.Cmd /X64 prior to building the amd64 windows JDK.
Windows i586 & Windows amd64: Because GNU Make has problems with spaces in command PATHS, it may be required that you set ALT_COMPILER_PATH to point to the locations of the SDK or VS.NET 2003 using the Microsoft Mangled Path name convention. For example, if the Microsoft SDK is installed in C:\Progam Files\Microsoft Platform SDK then the settings using mangled path names on the system may be:
SET ALT_COMPILER_PATH=C:\Progra~1\Micros~3\bin\win64\x86\amd64, depending on the unique situation of your build machine.The compiler and tools binaries must be in the PATH.
Unix Command Binaries
Windows i586 & Windows amd64: Both the JDK build 32-bit and 64-bit(amd64) requires access to Unix command binaries supplied by MKS Toolkit or Cygwin. Note that the build environment must be pure MKS or pure Cygwin. An MKS build cannot use Cygwin binaries and a Cygwin build cannot use the MKS Shell, binaries or GNU Make built for MKS. You may have trouble downloading Cygwin from amd64 systems. In that case, you can download the packages onto 32-bit machine then move the packages into 64-bit(amd64) machine and complete your installation.
Cygwin: The JDK build requires Cygwin version 1.5.12 or later. Information about Cygwin can be obtained from the Cygwin website at http://www.cygwin.com. If the binaries are not installed in /bin, set the ALT_UNIXCOMMAND_PATH environment variable to their location. It comes complete with GNU Make version 3.80 (as make instead of gnumake).
By default Cygwin doesn't install all the tools required for building jdk product. Along with the default installation, you need to install the following tools.
Binary Name Package Description ar.exe Devel binutils: The GNU assembler, linker and binary utilities make.exe Devel make: The GNU version of the 'make' utility m4.exe Interpreters m4: GNU implementation of the traditional Unix macro processor cpio.exe Utils cpio: A program to manage archives of files file.exe Utils file: Determines file type using 'magic' numbers
MKS Toolkit:The 32-bit JDK build requires MKS Toolkit version 6.1a or later and the 64-bit (amd64) JDK build requires MKS Toolkit version 8.0 or later. Information about the MKS Toolkit can be obtained from the MKS website at http://www.mks.com. If the binaries are not installed in C:\mksnt\ for 32-bit and C:\mksnt\mksnt for 64-bit, set the ALT_UNIXCOMMAND_PATH environment 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 C:\Program Files\MKS Toolkit\mksnt, then ALT_UNIXCOMMAND_PATH should be set to C:\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.
GNU Make: If you are using MKS toolkit, then GNU make version 3.78.1 or later is required for building both 32-bit and 64-bit version of JDK. Place the location of the GNU make binary in the PATH.
If you are using MKS toolkit, then GNU Make built for the MKS shell per the instructions in its documentation, is required to build the JDK. Information on GNU make, and access to ftp download sites, are available on the GNU make web site.
If you are using Cygwin, then it comes complete with GNU Make version 3.80 (as make instead of gnumake).
Zip and Unzip: If you are using MKS Toolkit, then you need ZIP.EXE and UNZIP.EXE should be installed in C:\UTILS. If you have them installed elsewhere set the environment variable ALT_DEVTOOLS_PATH to their location. ZIP.EXE version should be 2.2 or 2.[2-9]. UNZIP.EXE version should be 5.12 or 5.1[2-9]. Information and the source code for ZIP.EXE and UNZIP.EXE is available on the info-zip web site.
msvcrt.dll
Windows i586: The JDK build requires access to msvcrt.dll version 6.00.8337.0 (version that we use ) supplied by Microsoft Visual C++ 6.0 Service Pack 2 (usually found in C:\WINNT\System32\). If the msvcrt.dll is not installed in $(J2SE_TOPDIR)\make\redist\i586, set the ALT_MSVCRT_DLL_PATH environment variable to their location.Windows amd64: The JDK build requires access to msvcrt.dll version 7.0.3790.0 and (version that we use ) supplied by The Microsoft Platform Software Development Kit (SDK), February 2005 Edition compiler (usually found in C:\Program Files\Microsoft SDK\redist\win64\AMD64). If the msvcrt.dll is not installed in $(J2SE_TOPDIR)\make\redist\amd64, set the ALT_MSVCRT_DLL_PATH environment variable to their location.
msvcr71.dll
Windows i586: If you are building with VS.NET 2003 compiler then the JDK build requires access to msvcr71 version 7.10.3052.4 (version that we use ) supplied by Microsoft Visual Studio.NET 2003 Professional Edition compiler (usually found in C:\Program Files\Microsoft Visual Studio .NET 2003\ Visual Studio .NET Professional 2003 - English). If the msvcr71.dll is not installed in $(J2SE_TOPDIR)\make\redist\i586, set the ALT_MSVCR71_DLL_PATH environment variable to their location.
msvcp71.dll
Windows i586: If you are building with VS.NET 2003 compiler then the JDK build requires access to msvcp71 version 7.10.3077.0 (version that we use ) supplied by Microsoft Visual Studio.NET 2003 Professional Edition compiler (usually found in C:\Program Files\Microsoft Visual Studio .NET 2003\ Visual Studio .NET Professional 2003 - English). If the msvcp71.dll is not installed in $(J2SE_TOPDIR)\make\redist\i586, set the ALT_MSVCP71_DLL_PATH environment variable to their location.
Bootstrap JDK
Windows i586 & Windows amd64: Both the JDK build 32-bit and 64-bit(amd64) requires access to a JDK 5.0 for Windows installation. The 5.0 binaries can be downloaded from Sun's JDK 5.0 download site. Set ALT_BOOTDIR to point to the location of the bootstrap JDK installation, and place its bin directory in the PATH.Windows i586: msitran.exe should be installed in C:\UTILS. If you have it installed elsewhere set the environment variable ALT_DEVTOOLS_PATH to their location. msitran.exe is available from the Windows Installer Feature of any recent Microsoft Platform SDK.Windows i586: msival2.exe/logo.cub should be installed in C:\UTILS. If you have them installed elsewhere, set the environment variable ALT_DEVTOOLS_PATH to their location. msival2.exe/logo.cub are available from the "Microsoft Windows Installer SDK" feature of any recent Microsoft Platform SDK. To obtain this .exe/.cub, you must double click on the msival2.msi in the bin directory of the Platform SDK. Select "Custom" install type, and install into your DEVTOOLS path.
cacerts
Windows i586 & Windows amd64: A certificates file named "cacerts" represents a system-wide keystore with CA certificates. In JDK and JRE binary bundles, the "cacerts" file contains root CA certificates from several public CAs (e.g., VeriSign, Thawte, and Baltimore).The source bundles contain a cacerts file without CA root certificates. JDK builders will need to secure permission from each public CA and include the certificates into their own custom cacerts file. Failure to provide a populated cacerts file will result in verification of a certificate chain during runtime.
The ALT_CACERTS_FILE should be set to point to the location of the populated cacerts file.
Mozilla Headers and Libraries
Windows i586: Note: The Java Plug-in product for Windows cannot be built from the Community Source Release. This section applies only to those with a separate source license for that product. The Mozilla Headers and Libraries are only required for building the Java Plug-in. If you do not build Java Plug-in, the headers and libraries are not required.Mozilla headers and libraries are required for building Java Plug-in. 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 and unpack the headers and libraries into a directory similar to the one shown below, and set the ALT_MOZILLA_HEADERS_PATH environment variable to the absolute path of the plugin directory.
+- plugin\ (set ALT_MOZILLA_HEADERS_PATH to this level) +- mozilla_headers_ns7.win32\
Microsoft DirectX 7 or DirectX 9 SDK header files and libraries
Windows i586 & Windows amd64: Microsoft DirectX 7 or DirectX 9 SDK (Summer 2004 Update or newer) headers are required for building both 32-bit and 64-bit (amd64) JDK. The DirectX 7 is no longer available, DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp. If the link above becomes obsolete, the SDK can be obtained from http://download.microsoft.com (search with the keywords "directx 9 sdk"). If the SDK is not installed toc:\dxsdk, set theALT_DXSDK_PATHenvironment variable to its location.c:\ (set ALT_DXSDK_DRIVE to this level) +- DXSDK\ (set ALT_DXSDK_PATH to this level) +- Include\ (set ALT_DXSDK_INCLUDE_PATH to this level) +- Libs\ (set ALT_DXSDK_LIBS_PATH to this level)Note: the ALT_DXSDK_* variables have the following order of precedence (from most to least):For example, ALT_DXSDK_DRIVE will be ignored if ALT_DXSDK_PATH is set.
- ALT_DXSDK_INCLUDE_PATH, ALT_DXSDK_LIBS_PATH
- ALT_DXSDK_PATH
- ALT_DXSDK_DRIVE
Microsoft Layer for Unicode on Windows 95, 98 and Me Systems libraries
Windows i586: Microsoft Layer for Unicode on Windows 95, 98 and Me Systems (MSLU) libraries are required for building JDK. The MSLU libraries consist of two files. One is the runtime binary (UnicoWS.dll) and the other is the static library (UnicoWS.lib). The runtime binary can be downloaded from here ( http://go.microsoft.com/fwlink/?LinkId=14851 ), and the static library is included in the Microsoft Platform SDK. The version of the runtime binary DLL is: 1.0.4018.0, and the static library should be the one in November 2002 edition (October 2002 update) of the Microsoft Platform SDK (Build 5.2.3718.1).
If the UnicoWS.dll and the UnicoWS.lib are not installed in %SystemDrive%\MSLU, you can specify those locations by setting the ALT_UNICOWS_DLL_PATH and the ALT_UNICOWS_LIB_PATH for each file.
Windows Build Environment Variables
This section describes environment variables that you can set to influence various aspects of the build. Some of these variables are mentioned specifically in the setup and build instructions above. Others you may set at your discretion.Environment variables may be set in the shell environment or on the GNU make command line.
- PATH
- Set the
PATHto contain:
- The location of the GNU make binary
- The location of the MKS Unix command binaries (see ALT_UNIXCOMMAND_PATH below)
- The location of the JDK bootstrap installation (see ALT_BOOTDIR below)
- The locations of the Windows NT system commands (usually C:\WINNT, and/or C:\WINNT\system32, and/or C:\WINDOWS, and/or C:\WINDOWS\system32)
In addition, execute the setup utility VCVARS32.BAT for 32-bit and SetEnv.Cmd /X64 for 64-bit.
- ALT_BOOTDIR
- The location of the JDK 5.0 bootstrap installation.
- ALT_OUTPUTDIR
- An override for specifying the (absolute) path of where the build output is to go.
- ALT_UNIXCOMMAND_PATH
- An override for specifying the location of the MKS or Cygwin Unix command binaries, needed only if they are not installed in C:\mksnt\ for MKS and /bin for Cygwin.
- ALT_COMPILER_PATH
- An override for specifying the location of the Microsoft C++ Compiler compiler.
- ALT_DEVTOOLS_PATH
- The location of the zip and unzip binaries. See Zip and Unzip for details.
- ALT_CACERTS_FILE
- The location of the cacerts file. See cacerts file for details.
- ALT_MOZILLA_HEADERS_PATH
- The location of the Mozilla headers and libraries, needed only if building Java Plug-in.
- ALT_DXSDK_PATH
- The location of the Microsoft DirectX SDK headers and libraries.
- ALT_MSVCRT_DLL_PATH
- The location of the msvcrt.dll.
- ALT_MSVCR71_DLL_PATH
- The location of the msvcr71.dll.
- ALT_MSVCP71_DLL_PATH
- The location of the msvcp71.dll.
- ALT_UNICOWS_DLL_PATH
- The location of the Microsoft Layer for Unicode runtime binary path.
- ALT_UNICOWS_LIB_PATH
- The location of the Microsoft Layer for Unicode static library path.
- MILESTONE
- The milestone name for the build (e.g. "beta").
- BUILD_NUMBER
- The build number for the build (e.g. "b27").
- 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_07").
Windows Build
- cd into the control/make directory.
- Start the build with the command:
make dev [ALT_OUTPUTDIR=directory-name-for-output] [MILESTONE=milestone_name] [BUILD_NUMBER=build_number] [other "ALT_" overrides]
Please be sure to use the GNU version of make.
Copyright 2006 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.
![]()