1

While I am trying to deploy an app on the Nokia Asha Emulator(Using SDK1.2), I get the following log each time I try to launch the application and the application does not load at all. I am not able to find any problem with my code.

The code I have is as follows:-

import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.sun.lwuit.Display;
import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.layouts.BorderLayout;

public class BatteryMeter extends MIDlet {

    public BatteryMeter() {
        // TODO Auto-generated constructor stub
    }

    public void destroyApp(boolean arg0) throws MIDletStateChangeException {
        // TODO Auto-generated method stub

    }

    public void pauseApp() {
        // TODO Auto-generated method stub

    }

    public void startApp() throws MIDletStateChangeException {
        // TODO Auto-generated method stub
        try{
            Display.init(this);

            Form f = new Form();
            f.setTitle("Hello World");
            f.setLayout(new BorderLayout());
            f.addComponent(BorderLayout.CENTER, new Label("I am a Label"));
            f.show();
        }
        catch(Exception e){
            e.printStackTrace();
        }

    }
}

The Log that I see is as follows:-

Emulator command: C:\Nokia\Devices\Nokia_Asha_SDK_1_2\bin\Nokia_Asha_SDK_1_2_em.exe -classpath "C:\Users\INVCH014\AppData\Local\Temp\_mtj.tmpINVCH014\Battery_Meter4579413394873524477.launch\Battery_Meter.jar" "C:\Users\INVCH014\AppData\Local\Temp\_mtj.tmpINVCH014\Battery_Meter4579413394873524477.launch\Battery_Meter.jad"
Connecting to Running "Nokia Asha SDK 1.2" Instance #12000 ...
connected to port 60058
connected to port 60059
MIDlet Saved: Battery_Meter.jad inside Memory card://Midlets folder.
MIDlet Saved: Battery_Meter.jar inside Memory card://Midlets folder.
 - java.lang.Class.invoke_verify(), bci=0
 - java.lang.Class.initialize(), bci=100
 - java.lang.Class.forName(), bci=0
 - com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1
 - com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=63
 - com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
 - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=24
 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=151
 - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=32
 - java.lang.Class.invoke_verify(), bci=0
 - java.lang.Class.initialize(), bci=100
 - java.lang.Class.forName(), bci=0
 - com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1
 - com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=63
 - com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
 - com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=24
 - com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
 - com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
 - com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=151
 - com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=32
 - java.lang.Class.invoke_verify(), bci=0
 - java.lang.Class.initialize(), bci=100
 - java.lang.Class.forName(), bci=0

I am totally confused whats wrong in this simple code. Please help me out.

Shiv Kumar Ganesh
  • 3,799
  • 10
  • 46
  • 85

0 Answers0