Problem developing the HelloWorld Project for Motorola IDEN Emulator
Hi all,
I have tried to create the HelloWoirld application per the Emulator help. When I try to run the application in the emulator I get the following
messages:
--
start building...
compile C:\myprj\HelloWorld.java...
preverifying...
packaging...
adding: com/(in = 0) (out= 0)(stored 0%)
adding: com/mot/(in = 0) (out= 0)(stored 0%)
adding: com/mot/j2me/(in = 0) (out= 0)(stored 0%)
adding: com/mot/j2me/midlets/(in = 0) (out= 0)(stored 0%)
adding: com/mot/j2me/midlets/helloworld/(in = 0) (out= 0)(stored 0%)
adding: com/mot/j2me/midlets/helloworld/HelloWorld.class(in = 1166) (out= 604)(deflated 48%)
adding: META-INF/(in = 0) (out= 0)(stored 0%)
adding: META-INF/MANIFEST.MF(in = 206) (out= 130)(deflated 36%)
Building over
starting emulator...
phoneNumber 97487050001
privateID 123*45*50001
--
Unhandled Exception while initializing: java.lang.ClassNotFoundException: HelloWorld
--
My HelloWorld.java file was created by cutting and pasting the text in
the Emulator's Help.
I would appreciate any guidance of how to get this application to
execute in the emulator.
I have copied and pasted the code below:
Thanks,
Jose
/*
* HelloWorld.java
*
* Mar 27, 2002
*
* (c) Copyright 2002 Motorola, Inc. All Rights Reserved.
* This notice does not imply publication.
*/
package com.mot.j2me.midlets.helloworld;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
/**
* A simple Hello World MIDlet
* @see MIDlet
*/
public class HelloWorld extends MIDlet {
/**
* Main application screen
*/
private Form mainScreen;
/**
* A reference to the Display
*/
private Display myDisplay;
/**
* Creates a screen for our MIDlet
*/
HelloWorld() {
myDisplay = Display.getDisplay(this);
mainScreen = new Form("Hello World");
/*
* Create a string item
*/
StringItem strItem = new StringItem("Hello",
"This is a J2ME MIDlet.");
mainScreen.append(strItem);
}
/**
* Start the MIDlet
*/
public void startApp() throws MIDletStateChangeException {
myDisplay.setCurrent(mainScreen);
}
/**
* Pause the MIDlet
*/
public void pauseApp() {
}
/**
* Called by the framework before the application is unloaded
*/
public void destroyApp(boolean unconditional) {
}
}

