J2ME program on mobile

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

J2ME program on mobile

Postby linkjames » Tue Aug 25, 2009 1:40 pm

Hello friends i needed help with J2me programming.
I have this hello world program which runs fine in emulator but when i create jar file and try to run on my mobile i get "Application Error".I use netbeans 6.7 and java ME SDK 3.0 with CLDC 1.1 and MIDP 2.0 and my phone is sony ericsson W700i.Can you guys please help???

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class hello extends MIDlet implements CommandListener{
private Form form;
private Command exit;

public hello(){
form=new Form("Hello world midlet");
form.append("howdy");
exit=new Command("EXIT",Command.EXIT,1);
form.addCommand(exit);
form.setCommandListener(this);
}

public void startApp() {
Display.getDisplay(this).setCurrent(form);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}

public void commandAction(Command cmd,Displayable displayable)
{
if(cmd==exit)
{
destroyApp(true);
notifyDestroyed();
}
}
}
linkjames
 
Posts: 2
Joined: Tue Aug 25, 2009 1:36 pm

Re: J2ME program on mobile

Postby DevelopmentTeam » Wed Aug 26, 2009 4:37 am

you should also check the properties in the jad file.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: J2ME program on mobile

Postby linkjames » Wed Aug 26, 2009 10:02 am

thanks for the reply.....but what exactly should i check in JAD file
linkjames
 
Posts: 2
Joined: Tue Aug 25, 2009 1:36 pm


Return to J2ME Games

Who is online

Users browsing this forum: No registered users and 2 guests

cron