4 Replies - 1517 Views - Last Post: 08 September 2010 - 10:15 PM

#1 jaythewebripper  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 17-June 10

jar files working good in emulator but not in the mobile

Posted 30 August 2010 - 07:45 AM

hey guys...!

I am jay,,,

currently just playing around with the mobile application development... I have just copied some code from Oracles website and got the 'hello world' application running in the symbian series 60 mobile emulator,,,but the problem is that I cannot get the same .jar file running in the actual mobile
device...

the mobile device throws an error saying Java App not supported or invalid Jar file.

could any1 help me figure out whats the catch...?

Is This A Good Question/Topic? 0
  • +

Replies To: jar files working good in emulator but not in the mobile

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10366
  • View blog
  • Posts: 38,403
  • Joined: 27-December 08

Re: jar files working good in emulator but not in the mobile

Posted 30 August 2010 - 11:48 AM

Moved to Mobile Development.
Was This Post Helpful? 0
  • +
  • -

#3 jaythewebripper  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 17-June 10

Re: jar files working good in emulator but not in the mobile

Posted 01 September 2010 - 09:15 AM

hey guys heres the code,,,I was working on...!

sm1 gimme some clue already lost a lot of time in searching for help in this matter...!



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

public class HelloMIDlet
    extends MIDlet
    implements CommandListener {
  private Form mMainForm;
  TextField textField = new TextField("Password", "Hello", 10, TextField.PASSWORD);
  
  public HelloMIDlet() {
      System.out.println("startApp");
    mMainForm = new Form("HelloMIDlet");
    mMainForm.append("hi this is kwel");
    textField.setLabel("Lable");
    mMainForm.append(new StringItem(null, "Hello, MIDP!"));
    mMainForm.append(textField);
    mMainForm.addCommand(new Command("Exit", Command.EXIT, 0));
    mMainForm.setCommandListener(this);

  }

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

  public void pauseApp() {}

  public void destroyApp(boolean unconditional) {}

  public void commandAction(Command c, Displayable s) {
    notifyDestroyed();
  }
}




Was This Post Helpful? 0
  • +
  • -

#4 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: jar files working good in emulator but not in the mobile

Posted 03 September 2010 - 02:05 PM

Which phone are you using?
Attach the JAR file along with your next post so I can have a look. It might not be generated correctly.
Was This Post Helpful? 0
  • +
  • -

#5 jaythewebripper  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 29
  • Joined: 17-June 10

Re: jar files working good in emulator but not in the mobile

Posted 08 September 2010 - 10:15 PM

anyways thank you very much guys...!

I have found the way out for this in Nokia forum.

I am using Nokia 3230 for running the .jar file. sm1 told me that it is a MIDP 2.0 and CLDC 1.0 device. SO accordingly I created new project in Netbeans. but still it gave me some pre-verification errors.

Then after sm1 told me to use Sun Wireless Toolkit(SWT). I build the .jar file using SWT.It worked fine and nw its running on ma Nokia 3230.

its fun to see your application to run on a hand held device, it was just a 'Hello World' program though.

I would be thankful if sm1 lets me know why was there an pre-verification error in Netbeans and how do I deal with it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1