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:
09:49:43 E/ddms: shutting down due to uncaught exception 09:49:43 E/ddms: org/eclipse/swt/graphics/FontData java.lang.NoClassDefFoundError: org/eclipse/swt/graphics/FontData at com.android.ddms.PrefsDialog.setDefaults(PrefsDialog.java:201) at com.android.ddms.PrefsDialog.init(PrefsDialog.java:140) at com.android.ddms.Main.main(Main.java:71) Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.graphics.FontData at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 3 more
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.
