The Source for Java Technology Collaboration
User: Password:



Andreas Schaefer

Andreas Schaefer's Blog

OpenJDK: Here I come

Posted by schaefa on May 10, 2007 at 12:27 PM | Comments (5)

Ditching the Keynote session at JavaOne I am sitting in the Alumni room and trying to get my head around the OpenJDK. Having a MacBook Pro I cannot download the JDK and build it on my Mac natively and so I needed to fire up my VMware installation of OpenSuSE and use Linux to build it on top of the Mac. So I went to the OpenJDK website, downloaded the source and the binary plugins and extracted them. Then I went ahead and tried to setup the environment as requested by j2se/make/jdk_generic_profile.sh script file like ALT_BOOTDIR, ALT_CLOSED_JDK_IMPORT_PATH, LANG and emptied JAVA_HOME. There I realized that I do not have Java 6 installed so I downloaded and installed it. Finally I was ready to fire up the build:

cd control/make
gmake sanity

and sure enough it failed right away complaining missing Alsa headers. After going through some hops I finally could install Alsa, Cups and Motif headers. For Motif I had to revert to lesstif-devel which I have to force to install because of the dependencies of lesstif. Nevertheless I got that going and after setting ALT_MOTIF_DIR to the directory (/usr/X11R6 on my box) containing the includes I was ready to go, at least I thought so. Unfortunately the sanity checks are looking for this file include/Xm/AccColorT.h which is not in lesstif but when I just created that file with vi the make system happily start to build, yeeha.

As a side note I wanted to fool the build by just creating the AccColorT.h file because I saw that on some mailing list that the JDK build does not need Motif but that is wrong, at least as of now. Some generated classes (I found a class called sizer.c) uses it in its imports.

Finally, after nearly an hour the built went through and a short java -version confirmed that I have built JDK 1.7.

Cool - Andy


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Thanks for the notes.

    Posted by: tompalmer on May 10, 2007 at 01:49 PM

  • I also tried build openJDK/svn on my iMac a day or so ago and got mired in the details of the gmake files and ended up cloning the Def-linux files to Def-darwin. The effort ended (for the moment) because of a broken nawk build in the darwin ports repository.

    I have posted a patch of the changes against the current svn HEAD here

    http://dave.cheney.net/paste/openjdk-20070511.darwin.patch

    Just to be clear. This doesn't actually work, but I will continue too update this patch in the hope that other OS X users can benefit from this. If anyone is interested in collaborating in this, please drop me a line at dave at at cheney dot net.

    Posted by: davecheney on May 10, 2007 at 04:57 PM

  • If you guys are interested in collaborating on this work, maybe you should think about kicking off a java.net project to share your work? Maybe in the Mac Java Community? We'd love to have you.

    Posted by: invalidname on May 10, 2007 at 07:55 PM

  • Except that Apple's marketing seems to tie each major release of Java with an OS upgrade (cynical comment), perhaps they'll see the benefit of community contributions and donate the OSX specific portions of their implementation to the OpenJDK project.

    We're writing a tool in 1.5 and would like to use 1.6 but there's no official version for OSX yet. C'mon Apple, 1.5 is a legacy platform!

    Posted by: pcox on May 10, 2007 at 08:04 PM

  • The JDK build does not need or use motif *libraries*.
    A few headers are still used to get some definitions for window manager communication.

    -Phil.

    Posted by: philrace on May 11, 2007 at 09:39 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds