Building OpenJDK on Windows with NetBeans

Trying to build OpenJDK on Windows ? Here are some simple steps that may help...

Here are the softwares required for the build.

- Download OpenJDK from http://download.java.net/openjdk/jdk7/ and unzip the contents
- Download and install jdk 6.0 from http://java.sun.com/javase/downloads/index.jsp and jdk 7.0 from http://download.java.net/jdk7/binaries
- Download and install openjdk binary plugs from http://download.java.net/openjdk/jdk7/
- Install Microsoft Visual Studio .NET 2003 Professional
- Install Cygwin from http://www.cygwin.com. Make sure you install it in dos/text mode. Along with the default installation, we need to install Devel, Interpreters and Utils pakages. For the build, we need make 3.80, so if the cygwin make in not 3.80, download make bundle from http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2 and untar it in a separate folder.
- Download and install findbugs from http://findbugs.sourceforge.net/downloads.html.
- Download and install Ant from http://ant.apache.org/bindownload.cgi
- Install Microsoft DirectX 9.0 SDK
- Download and install Microsoft Unicode library
- Install Freetype 2.3.4 from http://sourceforge.net/project/showfiles.php?group_id=3157
- Install NetBeans 6.0 from http://www.netbeans.org/downloads/

To build OpenJDK with NetBeans, open 'jdk' project in openjdk/jdk/make/netbeans/ with NetBeans. But first open a command window (cmd.exe) and set the path for following installed softwares:

set PATH=d:/utilities/usr/bin;d:\\devtools\\cygwin\\bin;D:\\devtools\\findbugs-1.3.0\\bin;
D:\\devtools\\apache-ant-1.7.0\\bin;%PATH%

Here, d:/utilities/usr/bin contains make 3.80. Also, it is setting the path for cygwin, FindBugs and ant.

then run vsvars32.bat of Microsoft Visual Studio .NET:
d:\\Progra~1\\Micros~1.NET\\Common7\\Tools\\vsvars32.bat

Now launch Netbeans from this command window.

In Netbeans, click on File->Open Project. Browse to openjdk/jdk/make/netbeans/ and select 'jdk'.

In openjdk/jdk/make/netbeans/common/make.xml file, change the location of bin/make to your 3.80 make.

<target name="-pre-init.windows" if="os.windows">
<property name="platform" value="windows"/>
<property name="make" value="d:/utilities/usr/bin/make"/>
</target>

In build.properties file, set the following environment variables:

bootstrap.jdk=d:/devtools/jdk1.7.0

make.options=\\
ALT_BOOTDIR=D:/Java/jdk1.6.0_03 \\
ALT_BINARY_PLUGS_PATH=D:/devtools/openjdk-binary-plugs \\
ALT_JDK_IMPORT_PATH=d:/devtools/jdk1.7.0 \\
ALT_DXSDK_PATH=d:/devtools/dxsdk9 \\
ALT_COMPILER_PATH=D:/Progra~1/Micros~1.NET/Vc7/bin \\
ALT_MSDEVTOOLS_PATH= D:/Progra~1/Micros~1.NET/Common7/Tools/Bin \\
ALT_MSVCR71_DLL_PATH= D:/Progra~1/Micros~1.NET/SDK/v1.1/Bin \\
ALT_FREETYPE_LIB_PATH=d:/devtools/freetype-2.3.4/lib \\
ALT_FREETYPE_HEADERS_PATH=d:/devtools/freetype-2.3.4/include \\
ALT_UNICOWS_LIB_PATH=d:/devtools/unicows \\
ALT_UNICOWS_DLL_PATH=d:/devtools/unicows \\
LD_LIBRARY_PATH= \\
CLASSPATH= \\
JAVA_HOME= \\
SHLVL=1 \\
OPENJDK=true

And that's all we need to do. Start the build (press F11 or right click on jdk project and click Build)

Comments:

Hi!

I fail to understand, why is DirectX 9.0 SDK required? (just inquisitive). I have succesfully built Open JDK on Linux with/without NetBeans.

Thanks,
Amit

Posted by Amit on December 02, 2007 at 04:33 AM IST #

Java 2D on Windows uses DirectX. And for building it on Windows you need DirectX header files.

Posted by Poonam on December 10, 2007 at 02:41 AM IST #

dude why u need need visual studio 2003

Posted by prathap on January 29, 2011 at 08:27 AM IST #

Great now you have to program programming language to simply compile to human readable format, bravo Oracle, might us well give us Windows users Java Lite Edition.

Posted by guest on September 12, 2012 at 01:40 PM IST #

Great now you have to program programming language to simply compile to human readable format, bravo Oracle, might us well give us Windows users Java Lite Edition.

Posted by guest on September 12, 2012 at 01:41 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

poonam

Search

Categories
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