<AWT Dev> Fastest means to rebuild awt_Component.cpp

Kelly O'Hair kelly.ohair at oracle.com
Mon Jul 12 08:53:48 PDT 2010

When building inside the jdk/make directory, there is a default 'make  
all' that populates the
OUTPUTDIR area jdk/build/$(PLATFORM)-$(ARCH)  bin, lib, classes, etc.  
This is enough to run the jdk, but no rt.jar and no formal images. The  
classes from the classes
directory are used directly. If you specified ALT_OUTPUTDIR, then look  

The "images" are created by running 'cd jdk/make && make images' which  
will show up in
directories j2sdk-image and j2re-image. This logic is mostly in jdk/ 
However, if you have not done a 'make all', the 'make images' will not  

The very top Makefile of the forest uses the jdk/make/Makefile and by  
default does both the
'all' and 'images' targets, but also redirects the default output  
directory to the top level.
So depending on what directory in the forest you are in, the default  
OUTPUTDIR can change,
and the images are never created by the lower level makefiles.


On Jul 12, 2010, at 8:43 AM, Pete Brunet wrote:

> Kelly, I successfully built just awt.dll - well almost.  That alone
> doesn't copy awt.dll/map/pdb over to the j2sdk image.  And it doesn't
> build rt.jar.
> What do I have to do to get rt.jar built and j2sdk-image populated  
> with
> awt.dll and rt.jar?  Looking at a log from a full build it appears I
> have to run the make in the launchers directory but that failed.   
> First
> it builds appletviewer.res and its main.obj and then I see:
> Created
> c:/OPF6CE~1/jdk7/build/WINDOW~2/tmp/sun/launcher/appletviewer/obj/ 
> appletviewer.lcf
> make[1]: *** No rule to make target
> `c:/OPF6CE~1/jdk7/build/WINDOW~2/tmp/java/jli/obj/jli.lcf', needed by
> `c:/OPF6CE~1/jdk7/build/WINDOW~2/tmp/sun/launcher/appletviewer/obj/ 
> appletviewer.exe'.
> Stop.
> make[1]: Leaving directory
> `/cygdrive/c/OpenJDK-b96m/jdk7/jdk/make/launchers'
> make: *** [build] Error 2
> By the way, to get awt.dll built (after doing a full build) this is  
> what
> worked for me, i.e. I had to set two more variables.  (I discovered  
> make
> -p and that was very helpful.)
> cd \
> set ALT_OUTPUTDIR=c:/OPF6CE~1/jdk7/build/WINDOW~2
> rem same as c:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug
> set ALT_JDK_IMPORT_PATH=c:/OPF6CE~1/jdk7/build/WINDOW~2/J2SDK-~1
> rem same as c:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\j2sdk- 
> image
> OpenJDKBuild-b96m.bat <-- sets the variables that are needed for a  
> full
> build
> eval `bin/vsvars.sh -v10` <-- at cygwin prmopt
> cd /cygdrive/c/OpenJDK-b96m/jdk7/jdk/make/sun/awt
> make 2>&1 | tee build.log
> Thanks, Pete
> ===
> Kelly O'Hair wrote:
>> Maybe you should try the awt alias.
>> I would assume you could do a full build, then 'cd make/sun.awt &&
>> make' to just
>> re-build awt, but you need to ask the awt engineers.
>> -kto
>> On Jun 28, 2010, at 2:06 PM, Pete Brunet wrote:
>>> If I am tweaking awt_Component.cpp, what is the fastest way to  
>>> rebuild?
>>> A full build is taking me two hours.  Thanks, Pete

More information about the awt-dev mailing list