Saturday Jun 07, 2008

Nominate OpenJDK, Netbeans !

Here it starts the nomination. Nominate OpenJDK for best project :). Is it not ?

Here goes the second nomination - Netbeans !

Thursday Feb 21, 2008

Mercurial on the way ...

Moving on to OpenJDK, mercurial is one big name we are hearing. It is similar to CVS or SCCS. A open source project. Vikram one of my team members has given yesterday one presentation on Mercurial. Have a look on his slides here. Slide speaks very basic of Mercurial and after reading this we can start of some of the basic mercurial operations.

Sounds very much faster than SCCS which we are using currently to bringover JDK Source Code. 



Friday Dec 07, 2007

OpenJDK Build on Netbeans with Windows / Solaris - Part IV

So its all done for Windows. Now coming on to Solaris, here the work is little less in compare to Windows(the same is valid for Linux as well, can be a excuse for me as I don't have Linux machine right now). Here is the list of downloads:

-> OpenJDK - Same link as mentioned in the previous blog (download the Solaris part, we have worked on Solaris x86)
-> Binary Plugin - Download from here.
-> CUPS Header - Download the latest cups from here.
NOTE: CUPS is Common Unix Printing System. It is doing a smart job of putting browser information into a printable format. I mean you don't have to worry about how printing is going to happen, it will be taken care by CUPS.
-> FreeType - Download from the same link provided in the previous blog. Any of the platform independent version will work for us.
-> jtreg - jtreg can be downloaded from the same link from where you are downloading OpenJDK. jtreg is a test suite that contains tons of testcase. Responsibility is to write a safe code and code change will not screw anything.

Thats it ! I am assuming that you have Netbeans 6+ and JDK 1.7 and JDK 1.6 binaries installed with you.

Now setting the file. Its very small in comparison to windows. Here it is:

// this is important because code contains many
//line which work on if(OPENJDK==true) code
OPENJDK=true \\

All done. Time to fire the build. More likely you will face the same problem what we have mentioned for Windows. If you are lucky enough then you will get the message "BUILD SUCCESSFUL"
(If I missed some step, please follow as it is in previous blog)

Sunday Dec 02, 2007

OpenJDK Build on Netbeans with Windows / Solaris - Part III

Now if you all set according to the last blog. This is/are the possible error(s) :

1. Error in make file : Multiple target \*\*\* . Yes, you need to downgrade the version of make file. "make.exe" resides in /cygwin/bin/make.exe. Check out its version, if its not 3.80, time to downgrade it. Download from here. Replace the make.exe of cygwin with this new make.exe ( make -version should be 3.80).
NOTE: make.exe is responsible to run make files. Makefiles are the one which contains instructions for a specific project, which file to compile and in which order.

2. Compilation error in - Try out Igor's solution
NOTE: Cygwin(make of Cygwin) still have some problem in understanding \\r character. So, this error may go with the upcoming binaries of Cygwin. One way is just remove \\r from the sh file - But then you will not get the proper file.

3. freetype.dll not found: Yes, freetype installation is  not creating any file like freetype.dll and this is surprising. If you investigate properly, you will get one file with name freetype.dll.a. Right now, lets rename it to freetype.dll(later we will check the problem of renaming this file)
NOTE: Just one line about freetype, it is providing uniform interface to access font files, support anti-aliasing as well.

4. I guess this is the main three error we came across. If anything else coming, then you need to check the installation of Cygwin again.  Errors like zip or tar.exe not found, means you have not installed the archive package of Cygwin.

Now if you are lucky enough, all things go fine and build will be ready. Again note that, jdk project module of Netbeans is only responsible for j2se build which mostly contains Java API not containing hotspot part. So, check the javac.exe and java.exe of your own openJDK build in the folder /openjdk/windows-i586/bin/.

5. Give a try to your Program. Ah it is running :-) cool. Now give a try on in which you are creating a Frame. If unluck you will get this error: not a proper dll file: freetype.dll. So, renaming is not actually working which we did in Error 2. Actually .a is a library achieve which is not a proper  file at this point. So, what to do ? Either find proper freetype.dll file from somewhere or take the source of freetype and compile it on .NET according to these rule.

Now its all yours. If you get any additional error, please let me know via comment or drop me a mail


Saturday Dec 01, 2007

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

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

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 file:

// this is important because code contains many
//line which work on if(OPENJDK==true) code
// write the path in ~ format (dir /x)
ALT_COMPILER_PATH={MS.NET2003_PATH}/Vc7/bin \\    
ALT_MSDEVTOOLS_PATH= {MS.NET2003_PATH}/Common7/Tools/Bin \\
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.

Friday Nov 30, 2007

OpenJDK Build on Netbeans with Windows / Solaris - Part I

Our team is ready with OpenJDK build for FOSS.IN, better to
say partially ready :). Me and Vikram is going to give the live demo about
building OpenJDK and how you can optimize the source code according to your own
need. For Example, if you don't like the default LookAndFeel of Java, change it according to
your like because now its your world, its your Java. Let me show you one simple
code change we have done with the gradient color. This
is the normal Ocean LookAndFeel of Java.

Before the code Change:


 After the code change:



Though building OpenJDK is little cumbersome process but come on, its a one time process. Just make the build ready once and then screw it as you want both on the Java level and on native level . Even more process and standard documents will come as OpenJDK goes into its maturity stage. You will love to know that Netbeans 5.5+ is giving a high class support for making OpenJDK across all platforms.

So for the real die-hard of Java, I am going to write Part II, III, ... upto N(covering some technicalities of building process) till I am not able to make you happy. Thanks to Igor and Sandeep who have replied my all shots of stupid questions.


Thursday Nov 29, 2007



Sun is ready for the big event FOSS.IN going to happen in Bangalore, India. Our J2SE team is going to give two demo. One is about OpenJDK and other is all about JavaFX, the new cutting edge technology. Both underwent through the dry run before the actual event occurs. We are ready with OpenJDK build on Win32 and off course Solaris. Without too much of the change Solaris scripts files can be mapped on Linux as well. If anyone of the blog reader(s) are interested in making build of OpenJDK, the please leave a comment or just drop me a mail. Thanks for Igor Nekrestyanov and Sandeep Konchady to provide lot of help.

We have made the build from command line and from Netbeans 6 both. Still lot of things to do :-)

Sunday Jul 08, 2007

jikes vs javac

jikes is something which converts .java file into .class file. Yes, it
is javac but IBM product not a Sun product. And let me begin with jikes
page on :

Some comparisons:

No. 1 : jikes is a open source software.
And so javac is ! Didn't get the advantage.

No. 2: Strictly Java compatible - It is not providing any superset or subset variation support.

Good, but this little of strictness most of time increase the code line.

No. 3: High Performance: Compilation is faster than javac.

really bother about compilation, anyway you have to come again and run
on java command. I guess world is ready to devote 2 more minute in

Anyway, I have compiled one of the .java file(one which i have used in the last post) on the most stable version of jikes:


Issued 5 system warnings:

\*\*\* Semantic Warning: The file "E:/Program Files/Java/jdk1.6.0/jre/lib/ext/" doe
s not exist or else is not a valid zip file.

\*\*\* Semantic Warning: The file "E:/Program Files/Java/jdk1.6.0/jre/lib/ext/" doe
s not exist or else is not a valid zip file.

\*\*\* Semantic Warning: The file "E:/Program Files/Java/jdk1.6.0/jre/lib/ext/" doe
s not exist or else is not a valid zip file.

\*\*\* Semantic Warning: The file "E:/Program Files/Java/jdk1.6.0/jre/lib/ext/" doe
s not exist or else is not a valid zip file.

\*\*\* Semantic Warning: The file "E:/Program Files/Java/jdk1.6.0/jre/lib/ext/" doe
s not exist or else is not a valid zip file.

Didn't get what this warning message is and really not why you show it to me 5 times.

Then I have tried to look into -version command.

javac -version

- javac 1.6.0

jikes -version

- Jikes Compiler - Version 1.22 - 3 October 2004
Copyright (C) IBM Corporation 1997-2003, 2004.
- Licensed Materials - Program Property of IBM - All Rights Reserved.
Originally written by Philippe Charles and David Shields of IBM Research,
Jikes is now maintained and refined by the Jikes Project at:
Please consult this URL for more information and for reporting problems.

Very informative :)). Originally written by ... what does that mean ?

No 4. jikes provides some cool feature like incremental build.

I didn't get anything out of it.

Look at this feature.

jikes ++

// After the 5 warning message.

Incremental: Enter to continue or q + Enter to quit:

nothing changed...

Incremental: Enter to continue or q + Enter to quit: (this if you change the code)


Incremental: Enter to continue or q + Enter to quit:

nothing changed...

No 5. clear error message.

I have removed one semi-colon from the code at line no. 25. Look at the error message printed by two compilers:

javac ';' expected
stringJDB = value
1 error


Found 1 syntax error in "E:/Program Files/Java/jdk1.6.0/bin/":

25. stringJDB = value
\*\*\* Syntax Error: ";" inserted to complete BlockStatementsopt

Are you able to find out something extra ? By the way what was the meaning of BlockStatementsopt ?

I guess I made too many of negative statement :), Ok some good features are here:

- it is providing some additional options like

> jikes +Punused-package-imports - which at compilation time, will show you those import statement which are not in use.

> jikes +Pnaming-convention - it will throw warning if you are not following the naming convention ( its really an idea of Sun, don't mind :) )

I didn't like the verbose information(javac -verbose .
Where is the time information man... parsing time, total time to make
class file... these are some of the cool use of verbose option. Showing
only which all files you are reading is a useless information.

Anyway, nice to see one step ahead in the world of open source.

Thursday Nov 23, 2006

java -ddoc option

One customization :

There is now more than lakh's of project developed in Java, that went for a maintenance, enhancement and servicing. The common problem in which most of the company stuck of is with the chain of ongoing and incoming employee. For a new engineer its difficult to understand the code written by someone else. And the worst happens when they don't have any supporting document to understand the code.

I am here proposing a java -ddoc option which generated a HTML(XML) format design document of the work flow of the code along with the output of the code.

It tells user about the class variables, share variables, method flow and Native API's(if any). Being Java an Open Java, engineers can understand the internal functionality and can perfectly understand the requirement of the written code.

Vaibhav Hi, I am Vaibhav Choudhary working in Oracle with JDK team. This blog is all about simple concept of Java, JVM and JavaFX.


« August 2016