Tag Archives: OS X

I have finally install Java 7 on my laptop. The Java install runs just fine. Getting maven to find it however was a little tricky.

To make Maven find Java 7 the JAVA_HOME variable is required again. This hasn't been used for a while since Maven have been able to find Java anyway. But with the switch to 7 Maven still uses Java 6 by default.

I always use .bash_profile to change my environment variables since I tend not to need them else were. It is located in the users home directory (I.E. ~/.bash_profile).

The path to the new Java install is '/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/'. So the complete setting should look like this:


When this has been configured Maven will use Java 7.

About a year ago I wrote this entry about how to get the Android DDMS tool to run in Snow Leopard with a 64bit JVM.

Recently Android released a new platform so I downloaded it, as well as the latest cut of development tools. In this new release there is now native support for running DDMS and other tools in a 64bit JVM. If you followed the instructions in the above entry you will now notice that you get an error with a stack trace similar to this:

This is because the tools don't know which of the SWT classes to use, now that it has two in the class path. To sort this out you need to remove the environment variable ANDROID_SWT. Then the tools will automatically use the default 64bit libraries shipped with Android.

A little while back I wrote about test driving Tornado development. This is all good and well, but how about getting instant feedback? If you are developing on a Mac or a Linux machine this is certainly possible. I found this great blog post on how to set up a change monitor on a directory that will alert you on test failures using Growl or Notify. Thanks Rodrigo Pimentel for the write up.

Please note that this entry has been revisited. The update is available here.

I just had the pleasure to launch the debugging tool for Android called Dalvik Debug Monitor Service. It is a tool that allows you to connect to the different VM's running on an Android emulator or phone. On OS X Snow Leopard this was unfortunately a bit more involved then I would have liked.

Not using the Eclipse IDE I was going to start this from the terminal. The Android SDK 1.5 through back an exception that I could not be bother to decipher so I decided to switch to SDK 1.6 to see how that worked. This time I was first of all requested to export a new shell variable called ANDROID_SWT so that I could create the AVD to use. I pointed this to $ANDROID_HOME/tools/lib where I found a swt.jar file. This worked and my AVD was created and started.

When I then tried to launch the DDMS tool it complained that it could not run a 32 bit SWT implementation on a 64 bit VM. OK, so I search around on the internet to find a 64 bit version of SWT. I found the SWT home page and there I found the download of the latest stable release of SWT for OS X. Great! Downloaded and installed and exported as ANDROID_SWT I got the same error! SWT does not yet support 64 bit OS X platforms as stable!

But I was in luck. I happen to have an install of the latest Eclipse IDE. This happens to be the last of the three OS X options on their download page (as a note of warning Eclipse is quite big). In here you will find the SWT plugin. This is the file you will need to get DDMS to work, I.E where the ANDROID_SWT variable should point. So if you don't want to move files around you can just point the ANDROID_SWT variable to $ECLIPSE_ROOT/plugins. If you want to copy the file to another location I copied the two SWT jar files org.eclipse.swt_3.5.1.v3555a.jar and org.eclipse.swt.cocoa.macosx.x86_64_3.5.1.v3555a.jar.

I would assume that you can download the development source from the SWT teams SVN and build it your self but I found it easier to just link to the Eclipse provided one.