Archive for May, 2006

jvm script (for OS X) update, and Blevins' setjdk function

Thursday, May 25th, 2006

I added a few more bits to my dumb OS X scripts:

function jvm() {
  if [ -z "$JAVA_HOME" ]
  then
    echo "No JAVA_HOME set, setting to default"
    export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/
    PATH=$JAVA_HOME/bin:$PATH
  elif [ $# -eq 0 ]
  then
    echo $JAVA_HOME | sed 's/.*Versions///' | sed 's//Home.*//'
  else
    if [ -d  /System/Library/Frameworks/JavaVM.framework/Versions/$1 ]
    then
        export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/$1/Home/
        PATH=$JAVA_HOME/bin:$PATH
    else
        echo "No such JVM: $1"
    fi
  fi
}

function jvms() {
    ls -1 /System/Library/Frameworks/JavaVM.framework/Versions/ | grep '^[0-9]'
}

Typing just ‘jvm’ will output the currently chosen jvm, unless there is not a default in which case it will set your JAVA_HOME to the CurrentJDK link in OS X.

This is all unnecessary though, browsing around I found David Blevins’ setjdk script which has the added enchantment of tab-lookahead. This can be found at http://docs.codehaus.org/display/ninja/setjdk.

Multidoc recap

Wednesday, May 24th, 2006

Played with multidoc a bit again tonight. Taking Antony’s modifications and bending them to my needs: http://people.apache.org/~bayard/multidoc-jnr/.

There are 104 different javadocs there, nicely arranged by artifact and version - with jardiff reports for each pair of consecutive javadocs.

Jakarta Commons moves to JIRA

Tuesday, May 16th, 2006

Commons is now using the ASF JIRA, though the websites are going to slowly reflect this move I suspect. I just made a stab at bringing Lang up to date.

It was quite an interesting post-migration. The data went over happily, but then I wanted to turn every component into a project of its own and making that somewhat easier took a combination of Jelly and Python scripts, and I still had to manually move all 37 groups of issues over. Three times when you factor in the two failed attempts on Saturday.

OS X Java version changing script

Monday, May 15th, 2006

I’m sure it’s going to hit issues somewhere, and such probably already exist, but the following seemed worth sharing for switching Java version on a Mac.

function jvm() {
    if [ -d  /System/Library/Frameworks/JavaVM.framework/Versions/$1 ]
    then
        export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/$1/Home/
        PATH=$JAVA_HOME/bin:$PATH
    else
        echo "No such JVM: $1"
    fi
}

function jvms() {
    ls -1 /System/Library/Frameworks/JavaVM.framework/Versions/ | grep '^[0-9]'
}

Usage is:

cuckoo:hen$ jvms
1.3
1.3.1
1.4
1.4.2
1.5
1.5.0
cuckoo:hen$ jvm 1.5.0
cuckoo:hen$

Apache SVN server problems

Wednesday, May 10th, 2006

Copied from an email to the ASF infra mailing list

Putting an email on the infra list to provide an update (from a
spectator’s point of view) on today’s issues.

Minotaur, which is chiefly handling the SVN repository, Apache project
sites, people.apache.org sites and login@apache.org email addresses
had a kernel panic and was acting up after the reboot (errors on
commands that should not have errored).

Things were taken down for a memtest run and the static websites (not
the dynamic tcl.apache or perl.apache) were failed over to Ajax
(failover machine in Europe). The memtest passed, and the subversion
repositories are being checked for validity while also making sure
that an up to date backup of the svn repositories is made.

Minotaur is slowly being brought back online. Sometime tonight
read-only SVN will be re-enabled; and presuming things go well I
imagine read-write and unix accounts will be turned back on. Medium
term, SVN will be moved to one of the machines that Infra have
recently been getting ready.

Klipsch iGroove

Friday, May 5th, 2006

About a week ago I bought a speaker setup for our iPods. After a little bit of Amazon research, I chose the Klipsch iGroove (which has in the week since dropped $50 in price). We’re very impressed with it, and Nathan loves having music on. At $199.99, I heartily recommend getting these to turn you iPod into an agile home stereo.

Note: Notice the word home. These are the type of speakers that you can easily move around the house, but you’re not going to be popping them in your luggage. For that kind of thing you need the crapper, cheaper models.

JProfiler open-source license

Friday, May 5th, 2006

A week or so ago I installed JProfiler along with open-source usage license (sent them an email asking if such was available after hearing that Matt Raible had done the same). The aim was to use it on a bit of Commons Lang performance testing, but I ended up doing that by hand. Instead the first usage was to investigate the performance of Commons CSV (in the Sandbox).

As always, it performed admirably, but there was one rather painful teething problem. At first nothing worked, no matter what happened I just couldn’t drill down into the source code. Eventually I realised that by default JProfiler lists ‘org.apache’ on its global ignore filter, because usually such a package is not the code being worked on.

So….JProfiler rocks, but remember to modify the global filter if it’s for Apache code.