In this episode we begin setting up the build tool chain and fetch a copy of the OpenJDK7 sources.
Java Technology has always been rooted in a Unix/Solaris OS background. To this day, you need a Unix-like environment before building on other platforms. Here we begin to set up the basic tools needed:
- install Cygwin
- NOTE: Add the following to the Cygwin packages installed by default. You will need them later:
Archive->zip
Archive->unzip
Base->tar
Devel->binutils
Devel->make
Interpreters->m4
System->procps
Utils->cpio
Utils->file
- These are not required by the JDK7 build, but as a U*ix developer I find almost everything in Base essential, as well as wget. Feel free to add anything else you would like to have.
Base-> "everything"
Web->wget
- If you plan to use ssh/sshd for remote access to the system, add a few more:
Admin->cygrunsrv
Net->openssh
Net->rsync
- NOTE: Add the following to the Cygwin packages installed by default. You will need them later:
- The current Cygwin distribution supplies Gnu make version 3.81-2, which is not compatible with the JDK7 Makefiles. Install v3.81 anyway to get the other dependencies, then find a version between 3.78.1 and 3.80 to lay down on top.
Here is make 3.80. If you installed Cygwin into the default location (C:/cygwin), the install scenario might go like this after you open a Cygwin terminal window:
Thanks to Igor Nekrestyanov for that hint.
mkdir -p /cygdrive/c/temp
cd /cygdrive/c/temp
wget http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2
cd /
tar xvjf /cygdrive/c/temp/make-3.80-1.tar.bz2
make --version
On one machine I set up, I needed to track down an unsatisfied reference to cygintl-2.dll before make version 3.80 would work for me. 'cygcheck -hv ./make.exe' was the key that pointed this out. - Install your favorite text editor (in my case, xemacs)
- Install hg (Mercurial) and the forest extension under C:/Mercurial, as described by Daniel Fuchs
- Edit c:\Mercurial\Mercurial.ini to add:
[extensions]
forest=c:/Mercurial/hgforest/forest.py
- Pull over your own copy of the OpenJDK source. Open a Cygwin terminal window and:
cd G: (Or wherever you set aside space for user files)
hg fclone http://hg.openjdk.java.net/jdk7/jdk7/ jdk7cd jdk7
hg fin
- Good job. Congratulations! Now for some homework: read the contents of file:///G:/jdk7/README-builds.html