Add classes to support J2ME MVM (multitasking VM)

This is needed to run multiple MIDlets.