DDMS on Ubuntu throws exception ?

I downloaded the latest Android SDK and connected my Nexus One. Once starting DDMS, it throws up this
[codesyntax lang=”xml” title=”DDMS error”]
user@wanaka-ubuntu:~/android-sdk-linux_x86/tools$ ./ddms

(ddms:10868): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
04:37:36 E/ddms: shutting down due to uncaught exception
04:37:36 E/ddms: java.lang.UnsatisfiedLinkError: Can’t load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)


If you read the log, you realize it tries to use the openjdk version, but we want to use the SUN (ahem Oracle) JRE.

Open the ddms script file and change the line (around line no.65)



javaCmd=”/usr/lib/jvm/java-6-sun-” (adapt it to your proper path to the java binary!)

There we go ! Lets snoop inside the phone

Dalvik Debug Monitor (DDMS)

and we can even create screenshots !

Android Screenshot