dcsimg
compile error
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   david_den
Posted On:   Wednesday, June 5, 2002 11:28 PM

i use j2me wireless toolkit compile my helloworld example. following is the codes: import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class HelloWorld extends MIDlet { private Form mainScreen; private Display myDisplay; HelloWorld() { myDisplay = Display.getDisplay(this); mainScreen = new Form("Hello World"); /*create a string*/ StringItem strItem = new StringItem("Hello", "This is a J2ME MIDlet."); mainScreen.append(strItem); } /** * Start the MIDlet */ protected void startApp() throws MIDletStateChangeException { myDisplay.set   More>>

i use j2me wireless toolkit compile my helloworld example.
following is the codes:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;


public class HelloWorld extends MIDlet {

private Form mainScreen;
private Display myDisplay;


HelloWorld() {

myDisplay = Display.getDisplay(this);
mainScreen = new Form("Hello World");

/*create a string*/
StringItem strItem = new StringItem("Hello", "This is a J2ME MIDlet.");
mainScreen.append(strItem);
}

/**
* Start the MIDlet
*/
protected void startApp() throws MIDletStateChangeException {
myDisplay.setCurrent(mainScreen);
}

/**
* Pause the MIDlet
*/
protected void pauseApp() {
}

/**
* Called by the framework before the application is unloaded
*/
protected void destroyApp(boolean unconditional)
throws MIDletStateChangeException {
}
}



then the tool reports errors following:

Project "HelloWorld" loaded
Project settings saved
Building "HelloWorld"
[Output directory for verified classes:d]
Error preverifying class HelloWorld
Class loading error:Truncated class file
com.sun.kvem.ktools.ExecutionException:Preverifier returned 1
Build failed

what makes this exception and how can i deal with it?

thax!

   <<Less
About | Sitemap | Contact