4

My phone is supposed to be able to run: JavaTM: MIDP 2.0, CLDC 1.1 based apps. However, no matter which app I try to install on it, I get the error: Downloaded JAR are invalid

I've tried to build Java ME projects on Netbeans, using MIDP 2.0 and CLDC 1.1 as specified. The apps are simple, using the auto generated code that comes with Netbeans, to display a hello world message. It works in the emulator however when I transfer the .JAR to the mobile, I get the above error.

This is the model and specifications of the phone.

Does anyone who developed any Java ME apps for this or any similar Samsung phones, have any idea of what I need to do?

Edit: Contents of jad file:

MIDlet-1: Midlet, , hello.Midlet
MIDlet-Jar-Size: 1565
MIDlet-Jar-URL: MobileApplication1.jar
MIDlet-Name: MobileApplication1
MIDlet-Vendor: Vendor
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.0
Ali
  • 261,656
  • 265
  • 575
  • 769
  • can you please show the .JAD file contain ? – Lucifer Sep 23 '12 at 07:46
  • @Lucifer Edited and added them – Ali Sep 23 '12 at 07:58
  • well, then, are you 100% certain your phone is configured to accept unsigned applications? I am afraid I don't know whether this specific phone even has such a parameter but it would be compatible with the MIDP specs if it did. Hopefully, if it exists, it is user-selectable. – michael aubert Sep 24 '12 at 20:53

2 Answers2

2

Although many phones allow additional methods of installing MIDlets, the only standard way that they are all supposed to support according to the JavaME specifications is:

  • put the jad and the jar on a web server somewhere anybody can access them. choose a server that your mobile network operator doesn't block.

  • open the phone web browser. make it go to the jad file URL.

  • the web browser should download the jad file, realize what it is, make the phone install the application.

  • the internet connection of the phone should be using the cellular network at the time of install (no wi-fi...)

michael aubert
  • 6,836
  • 1
  • 16
  • 32
1

Maybe your filename is too big. "MobileApplication1" has 18 characters. Try to reduce both names (jad and jar) to equal or below 13, for example: MobileApp.jad and MobileApp.jar
Place both files at SD Card and open Jad file.

Telmo Pimentel Mota
  • 4,033
  • 16
  • 22
  • Also, if I run the .jar or .jad, i see a dialog with the name of the app, vendor name, etc and an install option. If i select the install option, it does start installing, and only then it says 'the jar file are invalid'. Do you think making the name shorter will still have any effect? – Ali Sep 23 '12 at 21:01
  • An "SD card" is a Secure Digital Card http://pt.wikipedia.org/wiki/Secure_Digital_Card Yes, I think that shortening might help because I have been through this. – Telmo Pimentel Mota Sep 24 '12 at 01:23