OpenJDK Build on Netbeans with Windows / Solaris - Part II

Talking of some of the details about OpenJDK building(on Netbeans), we can start with Windows build(x86). In general,building on windows is tougher than Solaris/Linux because there are lot of dependencies on other tools and we can't set up the tools on network. Now lets see the list of the downloads required (don't abuse me, I know its too much :-))

- OpenJDK - Download open source JDK

- Binary Plugin - Download Binary Plugin 

We need to install binary of Java SE 6, which we can get from Sun site and Java SE 7 which we can download from http://download.java.net/jdk7/binaries

Now this is all about JDK downloads. Time to put hand into the dirty world of other dependent tools:

1. As we have lot of C++ code(native code) inside JDK, we need a C++ compiler. For windows, JDK document suggests to use .NET2003. Though we have made the build on .NET 2003 but I guess compiler of .NET 2003 is free on net and you can give one try with free compiler. Note here: Don't try with .NET 2005 as many of the API get deprecated.

2. Cygwin Installation: This is a area of concern. We have invested(wasted :D) 90 percent of the build time in this tool. Installing, uninstalling, reinstalling .. and  it keep on going. On the first installation page of Cygwin itself , you will get two options: Unix/Binary or Dos/Text. Any option can work, can't work depending on your luck :-). Most of the engineer suggested me to install Unix/Binary but Dos/Text worked for us :D. Download from: Cygwin Site

NOTE: Don't forget to download Developer, System, Utility, Archive  package of its full mode not the default mode.

3. Install Microsoft DirectX 9.0 SDK(Summer Package) - Download it from Microsoft site

4. Download and Install FindBugs and Ant

5. Download Microsoft Unicode Library

6. Download and install latest version of freetype from www.freetype.org

7. Oops, if you don't have Netbeans 6 then download that also :)

Time to take a cup of coffee. Let the download to go on.

OK, back from coffee ...

Add Ant, Findbugs, Cygwin(till \\bin) in the path variable of system.  Open cmd, run vsvars32.bat (Micros~1.NET\\Common7\\Tools\\vsvars32.bat) to initialize the .NET variables. Run Netbeans.exe from the same command line.

Open openjdk/jdk/make/netbeans/ in netbeans and open project jdk. Open some of the important file like build.propertied and make.xml. In make.xml file, you will get the path of make, change it to the cygwin make file {cygwin/bin }.

Now IMPORTANT, get ready to write build.properties file:

bootstrap.jdk={PATH_JDK7_INSTALL}
make.options=\\
// this is important because code contains many
//line which work on if(OPENJDK==true) code
OPENJDK=true
// write the path in ~ format (dir /x)
ALT_COMPILER_PATH={MS.NET2003_PATH}/Vc7/bin \\    
ALT_MSDEVTOOLS_PATH= {MS.NET2003_PATH}/Common7/Tools/Bin \\
ALT_MSVCR71_DLL_PATH= {MS.NET2003_PATH}/SDK/v1.1/Bin \\
ALT_BOOTDIR={PATH_JDK6_INSTALL} \\
ALT_BINARY_PLUGS_PATH={PATH_BINARY_PLUGS}
ALT_JDK_IMPORT_PATH={PATH_JDK7_INSTALL} \\
ALT_DXSDK_PATH={DIRECTX_PATH} \\
ALT_FREETYPE_LIB_PATH={FREE_TYPE_PATH}/lib \\
ALT_FREETYPE_HEADERS_PATH={FREE_TYPE_PATH}/include \\
ALT_UNICOWS_LIB_PATH={UNICOWS_PATH} \\      
ALT_UNICOWS_DLL_PATH={UNICOWS_PATH} \\
LD_LIBRARY_PATH= \\
CLASSPATH= \\
JAVA_HOME= \\
SHLVL=1 \\     
             

All Done ! Fire the build now, if you are lucky enough you will get it done in some 20-30 minutes. In the next blog, we are going to talk about the problem(s) with some of this software and version dependencies.

Comments:

Thanks for your reply. I just solved the problem of freetypecheck.c.
What we have to do is that
(1) Create a freetype.lib by building visualc project present in builds/win32 using MS.Net 2003 (Release Version)
(2) Now copy the generated lib file along with include folder (of freetype) in one directory and set the paths ALT_FREETYPE_LIB_PATH, ALT_FREETYPE_HEADERS_PATH
(3) Now give command using Cygwin

make sanity OPENJDK=true

You must give OPENJDK=true else you will get freetypecheck.c errors
It will create required freetype.dll

The reason for giving this parameter is given on following page.

http://mail.openjdk.java.net/pipermail/build-dev/2007-August.txt

by Ted Neward

Posted by kaiwalya joshi on December 27, 2007 at 04:17 AM IST #

Thanks for your reply. I just solved the problem of freetypecheck.c.
What we have to do is that
(1) Create a freetype.lib by building visualc project present in builds/win32 using MS.Net 2003 (Release Version)
(2) Now copy the generated lib file along with include folder (of freetype) in one directory and set the paths ALT_FREETYPE_LIB_PATH, ALT_FREETYPE_HEADERS_PATH
(3) Now give command using Cygwin

make sanity OPENJDK=true

You must give OPENJDK=true else you will get freetypecheck.c errors
It will create required freetype.dll

The reason for giving this parameter is given on following page.

http://mail.openjdk.java.net/pipermail/build-dev/2007-August.txt

by Ted Neward

Posted by kaiwalya joshi on December 27, 2007 at 04:18 AM IST #

Thanks for your reply

Posted by Abercrombie and Fitch on February 06, 2010 at 10:20 PM IST #

Post a Comment:
Comments are closed for this entry.
About

Hi, I am Vaibhav Choudhary working in Sun. This blog is all about simple concept of Java and JavaFX.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today