I have managed to run a python generated midlet in a JavaME emulator. The problem is, that the emulator returns with:


Installing suite from:

java.lang.Error: ClassFormatError:  56

 - java.lang.Class.forName(), bci=0

 - com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1

 - com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=66

 - com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17

 - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=27

 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52

 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8

 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161

 - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26


I read somewhere that this error is related to incompatible bytecodes or class file format. JavaME supports Java 1.3 (AFAIK) and Jython obviously uses the latest (1.5).


So, is there a way to specify to compiler compliance level when generating the class files or is it possible to generate a Java file instead of a class file so I can manually change and recompile it?