Friday, March 20, 2009

Installing signed Java midlet with Nokia Application Installer, midlet appears not to be signed


I had the following problem: my Java midlet was signed, but when using Nokia Application Installer (comes with Nokia PC Suite), it showed the midlet as coming from not trusted 3rd party.

The jad-file clearly showed me that it actually was signed, but the installer in the phone told me that it was not.

And as the midlet appeared not signed, it was constantly nagging about read/write/connection permissions. That was not acceptable.


I then sent the files, BOTH jad and jar, to the phone via bluetooth. When installing the midlet with jad sent over bluetooth, the installer recognized the certificates, and the application was installed nicely.

Then the reason to the problem hit me: the jad had different filename as the jar! The jad was named MyApplication.jad, and the midlet was named MySpecialApplication.jar.

It seems that the Nokia Application installer does not read jad-files, and then discover the mentioned jar-files, but actually it reads first the jar files, and then tries to find jads with the same filename.


A) Just rename the jad, to be able to install the midlet with Nokia Application Installer. Or even better, change your project settings in Eclipse (or in whatever IDE you are using), to produce correctly named files.


B) Stop using application installer, and start sending the jad and jar files to the phone via bluetooth yourself.