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 Aug 03, 2008

"IRU Account Lookup Error" - iPhone 3G

Finally took the plunge and bought an iPhone 3G for my wife!

Yeah, I still have a Motorola Razr which sometimes wonder how it survived for  more than 2 years now. I'm ready for a change but that's a different story!

Anyway, the process of buying an iPhone was relatively simple - although long wait times (upto 1.5 hrs) were painful. The long wait times are mostly because of limited number of Specialists in the Apple store.

Here is my bulleted story:
  • After a 1.5 hour long wait in the queue, first outside the store and then inside, we finally met Apple Specialist in the Apple Valley Fair store.
  • I'm the primary account holder and my wife is secondary. The Specialist was not aware whose SSN last digit numbers are required to lookup the account. So we tried combinations and finally figured it out. After selling 1 million iPhones on the first weekend, I though he'd be aware of that.
  • Finally we got the dreaded "IRU Account Lookup Error". This error is associated with an AT&T account if there is any kind of corporate discount attached - which is true in my case. At this point, Apple Specialist could not proceed with the sale. Instead he asked me to work with AT&T and get the "IRU error" removed from the account. Read more about this in Apple Tech Support. I liked his analogy of "forced marriage" between Apple & AT&T where only one agrees, wonder which one ;-)
  • Luckily there was AT&T store in the mall. I went to the store, got the corporate discount detached from the account and then went back to Apple store. I'm told the corporate discount can be attached back to the account after iPhone purchase.
  • After another 20 minutes wait, finally got the iPhone and luckily everything worked. Even there the receipt was not getting printed so an additional 15 minutes wait.

Overall, had a pleasant experience with Apple and AT&T but not having access to AT&T database does give the feeling of "forced marriage" ;-)

But I like the fact that the phone comes charged for upto 1 day use and ready to use!

Technorati: iphone apple at&t

Tuesday Jul 01, 2008

iPhone 3G Guided Tour


Replacing the original auto-play movie with the youtube version (as mentioned in the comments):

Currently planned to be released on Jul 11!

Technorati: apple iphone

Wednesday Dec 19, 2007

OSX #1: Getting Started with a Mac for a Windows User

MacBook Image I got a new Apple MacBook Pro (Intel Core 2 Duo, 2GB RAM, 160 GB HDD and other good stuff) and excited about that! However I've been a Windows user all along and this is my first interaction with a Mac.

So here are some basic tips/tools to get you started if you are in the same situation:

  • Start with Mac101 - This will get you familiar with Mac, basic terminology, some keyboard hints and other misc stuff.
  • Keyboard mappings between a Windows and Mac keyboard are very different. It would help to print out the mappings and keep them handy. It can take more than a day to get used to the new mappings. Some specific ones are:
    • "Right-click"ing is not intuitive - Enable Two-Finger Click on the Trackpad
    • No Forward Delete key, Mac equivalent is Fn + Delete
    • No dedicated Home, Page Up or Page Down keys, Instead use Fn + Cursor keys
  • Install the following tools
Also read 10 tips for Mac users switching from Windows and a more comprehensive list at Switch to The Mac.

The box came installed with Tiger (Mac OSX 10.4) as opposed to Leopard (Mac OS X 10.5). Leopard Updates are available for $9.95 until Jan 4th, 2007.

Some other striking difference in the terms of UI are:

  • The menus, instead of stacked to each window, are always available at the top.
  • "Windows Control Panel" is available as "System Preferences" on Dock (the toolbar which is, by default, at the bottom of the screen).
  • Minimize/Maximize/Close buttons are to the left instead of to the right.
  • Maximize button only maximizes to the required extent instead of occupying the entire desktop.
  • Important keyboard shortcuts
    • F9 - Shows all open windows
    • F10 - Shows all open windows for the current application (every thing else is greyed out)
    • F11 - Hides all windows and shows the Desktop
    • F12 - Show Dashboard

Here are some other tasks that I tried:

  • iMovie is really cool, I could easily create a movie (with in-built camera) and upload a video directly to youtube. Really good intuitive interface.
  • Create clean HTML pages (like this blog): TextEdit (the default editor) adds redundant markers and viewing HTML source code is not intuitive/easy. So does NeoOffice. Microsoft Front Page is really good at that and I've thoroughly enjoyed editing my blogs using it. So I'm looking for something comparable on Mac. I found this HTML editor shootout  but most of the editors seem to require some manual addition of HTML tags. Googling further, I found KompoZer (based on Nvu) and liking it so far. Part of the reason is that the look-and-feel is quite like FrontPage ;-)

These tips will at least get you started where you can check Email, IM and Web, view your documents, import key settings from Firefox/Thunderbird and unleash the potential of GlassFish and NetBeans. Lots of other tips are available here, here and here. I'll post more as I learn them. Feel free to post your favorite tool/tip/guidance here.

A complete archive will be available here.

Technorati: windows mac apple tools osxtips

Wednesday Jun 13, 2007

Safari Beta3 on Vista

I downloaded and installed Safari Beta 3 on Vista Ultimate.

I've never used Safari earlier but here is how it looks on my Windows Vista Utlimate laptop:

Of the 12 features, I like "Private Browsing" (disable Caching, Cookies etc for a particular session) and Snapback (an icon in search field or address bar that takes you back to an anchor point during multi-level searches). Resizing the Text Fields seems rather weird to me as it might break the page layout. All other features already exist in Firefox.

It's interesting that a new Firefox plug-in for "private browsing", Distrust, is already available. I've not tried the plug-in as it is in very early version and I particularly don't feel the need for "private" browsing ;-) There is even a Safari Theme for Firefox for MAC OS-X users only.

As per the Blazing Performance claim, the default home page for Safari is http://www.apple.com/startpage/ and loads slowly in both Firefox and Safari. I think Safari should change the default page to google.com or something so that the first impression is better.

Also the browser window, unlike other normal Windows application, is not resizable from the edges, only from the lower-right corner. Wonder why ?

In all, I don't see any compelling reason to switch from Firefox.

Technorati: Firefox Safari Apple

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