I've got a game running on the series 40 emulator, downloaded it onto my phone (6100) and I get a java.lang.IllegalStateException.

In the MIDlet.startApp implementation I read some data from a file in the jar using the following code:

try {
src = getClass().getResourceAsStream(WORLD);
Vector maps = new Vector();
int mapCount = src.read();
for (int i=0; i<mapCount; i++) {
maps.addElement(new Map(src));
}
src.close();
...
} catch (IOException e) {
...
}

I also create a com.nokia.mid.ui.FullCanvas instance here.

Anyone got any ideas? I'd optimistically hoped that the system software would be the same on the emulator and the phone!

This is my first attempt at developing for a phone, so sorry if it's something really basic!

Thanks!