I`m new to programming in J2ME and am trying to create a program using the Nokia series 60 2nd edition SDK. I`m also using ktoolbar and MIDP 1.0.
It works fine if I use the default emulator that comes with ktoolbar but when I use the series 60 one I get the following error:
Error preverifying class java.lang.String
ERROR: floating-point arguments should not appear
com.sun.kvem.ktools.ExecutionException: Preverifier returned 1
Build failed
I dont have any floats in my code as far as I can tell and so dont know how to get it working.
A basic Hello World program I created also does the same, the code is as follows, Anyone have any ideas?
Code:import javax.microedition.midlet.*; import javax.microedition.lcdui.*; //Midlet class public class HelloWorldMIDlet extends MIDlet { public HelloWorldMIDlet() { } public void startApp() { //Get display Displayable current = Display.getDisplay(this).getCurrent(); if(current == null) { //Create new screen HelloScreen helloScreen = new HelloScreen(this, "Hello World."); //Set the screen Display.getDisplay(this).setCurrent(helloScreen); } } public void pauseApp() { } public void destroyApp(boolean b) { } void exitRequested() { destroyApp(false); notifyDestroyed(); } } class HelloScreen extends TextBox implements CommandListener { private final HelloWorldMIDlet midlet; private final Command exitCommand; //Constructor HelloScreen(HelloWorldMIDlet midlet, String string) { //Create text box super("HelloWorldMIDlet", string, 256, 0); //Get the midlet this.midlet = midlet; //Create Command button exitCommand = new Command("Exit", Command.EXIT, 1); //Add the command addCommand(exitCommand); //Listen for command presses setCommandListener(this); } public void commandAction(Command c, Displayable d) { if(c == exitCommand) { midlet.exitRequested(); } } }

Reply With Quote


