I was tearing my hair of over the same problem and it was solved by changing JDK from 1.4 to 1.2.2. Make sure that JDK 1.2.2 is first in your path so that it is used to run the emulator.