views:

145

answers:

3

I'm Developing a peace of software for my Uni and am currently attempting to implement NFC functionality witch requires me to move from my standard sun wireless tool-kit platform (implemented through net-beans) to a Nokia platform (also implemented through net-beans).

The problem is, whenever I compile the code with the Nokia platform implementation and run the program, on the Nokia phone I have or in the emulator, the phone displays a box stating "Invalid Application. Delete?" with a yes/no answer , stopping the installation the app. The strange part is that if I compile the exact same code with the sun platform implementation it runs with out any issues on the Nokia phone. I have tried this with two different Nokia sdk's (the Series 40 Nokia 6212 NFC sdk and the Series 40 5th Edition sdk) with the same results.

I was wondering if anyone else has come across this before and has figured out what on earth the Nokia sdk is doing differently?

Thanks For Your Help

A: 

Make sure that the following attributes (key:value pairs) are in the jad file and also the manifest file in jar:

  1. MIDlet-Name
  2. MIDlet-Version
  3. MIDlet-Vendor
  4. MIDlet-Jar-URL
  5. MIDlet-Jar-Size
omermuhammed
The program is being compiled via net-beans so both the jad and the manifest are automatically created, I double checked that these things were there and they are.
Steven Knox
A: 

There seems to be some kind of discrepancy between a project created using a sun platform and a project created in a Nokia platform. Although the original program, initially created with the sun platform, compiled with the Nokia platform caused the application to be invalid, when I created a new project from scratch using the Nokia platform and just copied the source of the original program over the program worked. There is no discernible difference in the jad/manifest files between the two.

Steven Knox
if by Nokia platform you mean Nokia SDK then there may be a difference in Java version and APIs. I recently noticed that Nokia SDK allows vectors, enums etc usage, which is not possible with J2ME because it is based on Java 1.3. One quick test would be to see if there are any differences in the included jars.
omermuhammed
Indeed it does seem to be the case but you would assume that both being sdk's designed to produce code for the same language that they would not have such a fundamental difference.P.S.you can use enums (http://download-llnw.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html) and vectors (http://download-llnw.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html) in j2me, perhaps you are thinking of an older implementation
Steven Knox
+1  A: 

If you've copied source code, you may have not copied the "manifest.midlets", i.e. tells the OS which "forms" to create. You'll usually find this in the project properties.

(e.g. in NetBeans IDE - Application Descriptor, "Midlets" tab - it shouldn't be empty).

JasonDiplomat
could have been this, doesn't this problem cause a compilation error? I obviously can't check now as the problem's solved.
Steven Knox
No it doesn't cause a compiler error - as it's the OS that uses it.
JasonDiplomat