Monday Nov 28, 2011

Build Open JDK 7 on Mac OSX (TOTD #172)




The complete requirements, pre-requisites, and steps to build OpenJDK 7 port on Mac OSX are described here. The steps are very clearly explained and here are the exact ones I followed on my MacBook Pro 10.7.2:
  1. Confirm the version of pre-installed Java as:
    > java -version
    java version "1.6.0_26"
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511c)
    Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)
  2. Download and install Mercurial from mercurial.berkwood.com (zip bundle for 10.7 is here). It gets installed in the /usr/local/bin directory.
  3. Get the source code as (commands highlighted in bold):

    hg clone http://hg.openjdk.java.net/macosx-port/macosx-port
    destination directory: macosx-port
    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    added 437 changesets with 364 changes to 33 files
    updating to branch default
    31 files updated, 0 files merged, 0 files removed, 0 files unresolved
    cd macosx-port
    chmod 7555 get_source.sh
    ./get_source.sh
    # Repos:  corba jaxp jaxws langtools jdk hotspot
    Starting on corba
    Starting on jaxp
    Starting on jaxws
    Starting on langtools
    Starting on jdk
    Starting on hotspot
    # hg clone http://hg.openjdk.java.net/macosx-port/macosx-port/corba corba
    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    added 396 changesets with 3275 changes to 1379 files

    . . .

    # exit code 0
    # cd ./corba && hg pull -u
    pulling from http://hg.openjdk.java.net/macosx-port/macosx-port/corba
    searching for changes
    no changes found
    # exit code 0
    # cd ./jaxp && hg pull -u
    pulling from http://hg.openjdk.java.net/macosx-port/macosx-port/jaxp
    searching for changes
    no changes found
    # exit code 0
  4. Install Xcode from the App Store. Include /Developer/usr/bin in PATH.

    Note: JDK 1.6.0_26 ame pre-installed on my laptop and I installed Xode after that. The compilation went fine and there was no need to re-install the Java for Mac OS X as mentioned in the original steps.
  5. Build the code as:

    make ALLOW_DOWNLOADS=true SA_APPLE_BOOT_JAVA=true
    ALWAYS_PASS_TEST_GAMMA=true ALT_BOOTDIR=`/usr/libexec/java_home -v
    1.6` HOTSPOT_BUILD_JOBS=`sysctl -n hw.ncpu`

    The final output is shown as:

    >>>Finished making images @ Sat Nov 19 00:59:04 WET 2011 ...
    >>>Finished making images @ Sat Nov 19 00:59:04 WET 2011 ...
    ########################################################################
    ##### Leaving jdk for target(s) sanity all docs images #####
    ########################################################################
    ##### Build time 00:17:42 jdk for target(s) sanity all docs images #####
    ########################################################################

    ## Build times ##########
    Target all_product_build
    Start 2011-11-19 00:32:40
    End 2011-11-19 00:59:04
    00:01:46 corba
    00:04:07 hotspot
    00:00:51 jaxp
    00:01:21 jaxws
    00:17:42 jdk
    00:00:37 langtools
    00:26:24 TOTAL
    #########################
  6. Change the directory and verify the version:

    >cd build/macosx-universal/j2sdk-image/1.7.0.jdk/Contents/Home/bin
    >./java -version
    openjdk version "1.7.0-internal"
    OpenJDK Runtime Environment (build 1.7.0-internal-arungup_2011_11_19_00_32-b00)
    OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)

Now go fix some bugs, file new bugs, or discuss at the macosx-port-dev mailing list.

Sunday Jul 29, 2007

OSCON 2007 Trip Report

As reported earlier jMaki and GlassFish, along with a host of other Sun-led open source technologies (NetBeans, OpenJDK, OpenDS, Project Indiana, etc.), were present at OSCON 2007 last week. I spent my entire 2 days at the jMaki booth which had a consistent stream of visitors on both the days. In case you are interested, here is what I presented:

The videos of other demos shown at the pod will be made available on this blog in the next few days.

I could not attend any of the sessions except some of the keynote sessions on second day. Of all the keynote videos the one I'd like you to watch is Overcoming Bias by Prof Robin Hanson. The professor, an Economic Theorist, talks about how cognitive bias cause software projects to slip. Some of the quotes from his talk are "Be more honest about writing code" and "If you really care about truth, you'll work at it and try to overcome bias".

Here are some pictures.


Sign Board

List of sponsors

Welcome Sign

jMaki and NetBeans booth

Sun booth

Sun booth

Sun booth

Marguerite @ Sun desk

Job Board

Mozilla Booth

An old friend - Tim Riley

Myself explaining jMaki

Cool give-away

OpenSolaris and OpenJDK booth

Joyent booth

Sun Microsystems in the keynote

Greg @ NetBeans booth

Ken @ GlassFish booth

Technorati: oscon sun jmaki glassfish opensolaris openjdk

About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

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