cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

FaqJ2MEMIDP20andPalm

I developed J2ME application in NetBeans. When running it as .prc on my Palm Tungsten C, I get message "Alert does not accept commands - java.lang.IllegalStateException." What is going on?

From MIDP 1.0 javadoc

public void addCommand(Command cmd)
Commands are not allowed on Alerts, so this method will always throw IllegalStateException whenever it is called.


Overrides:
addCommand in class Displayable


Parameters:
cmd - the Command
Throws:
IllegalStateException - always

it seems that the Palm VM supports MIDP 1.0 only. IBM Java VM v 2.2.012 for Palm Tungsten C should be fully MIDP 2.0 compliant.