You Are Here:

Community: Developer Discussion Boards

#1 Old executing - "invalid file" - 2003-10-11, 15:51

Join Date: Oct 2003
Posts: 2
mrizek
Offline
Registered User
when i make midlet, i can execute it with emulators i have. When i install it to real phone(6310i) and try to execute it there - "invalid file" message apears! Does anybody have any idea how can this happen?
Reply With Quote

#2 Old 2003-10-11, 18:07

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
Have you preverified your MIDlet?
Reply With Quote

#3 Old 2003-10-11, 20:19

Join Date: Oct 2003
Posts: 2
mrizek
Offline
Registered User
Yes i have. A few minutes ago,i even tried to make a simple example step by step in compliance with book. But still same problem.
Is it possible that my phone is demaged and therefor that does not work?
Or it can be becouse i installed wrong software(i use j2se v1.4, WTK v1.0.4_01 and Nokia developer's suite 2.0)?
Reply With Quote

#4 Old 2003-10-11, 22:03

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
Emulators often have two ways of running a MIDlet... one for debugging, which bypasses many of the normal checks on the MIDlet, and one for testing deployment (may be referred to as a "provisioning" mode) that is more strict. If you are running your MIDlet on an emulator in the normal debugging mode, it may allow you to use a MIDlet that is actually invalid, because the JAD file is incorrect, the manifest in the JAR is incorrect, or the JAR file is too large.

If you can install the MIDlet, but not run it, then presumably the JAD is OK and the JAR is small enough. Possibly, there is something wrong in the manifest, the manifest doesn't match the JAD, or the MIDlet-n: item in the JAD is wrong.

Graham.
Reply With Quote

#5 Old 2003-10-11, 22:06

Join Date: Mar 2003
Posts: 86
Location: Austria
mcmcdonald
Offline
Regular Contributor
Have you tried to start the jar or the jad file ? On 3510i emulator you get this message when you try to load the jar instead of the jad file.
Reply With Quote

#6 Old 2003-10-12, 15:02

Join Date: Oct 2003
Posts: 4
cyberyo
Offline
Registered User
Here you are jad file and MANIFEST.MF file who is working on a 7250

Jad
------

MIDlet-Name: sendmail
MIDlet-Version: 1.0
MIDlet-Vendor: Yoan
MIDlet-Jar-URL: SendMail.jar
MIDlet-Jar-Size: 3273
MIDlet-Description: SendMail
MIDlet-Icon: /icon.png
MIDlet-1: sendmail, /icon.png, sendmail

MANIFEST.MF
---------------------

MIDlet-1: sendmail, ,sendmail
MIDlet-Name: sendmail
MIDlet-Vendor: Yoan
MIDlet-Version: 1.0
Reply With Quote

#7 Old 2004-03-09, 20:25

Join Date: Feb 2004
Posts: 1
rlincke
Offline
Registered User
As far as I know is it absolutely necessary, that the attributes specified in the .jad file are identical to the ones specified in the manifest file.

For example in the .jad you specify in the MIDlet-1: attribute the /icon.png and in the manifest not.

Also you should check, if the manifest file in the .jar really contains all the information specified in your manifest. I found, that the jar.exe tool manipulates the manifest, adds some new entries, and surprisingly sometimes deletes others.

Also you might need to specify the MicroEdition-Profile attribute in the manifest file.

Hope this helps a bit. I was trying for hours to make mine work, and then found, that the order of the attributes in the .jad file has some effect, if the stuff is working on my Nokia 6310i, and that also some attributes where missing in the manifest file stored in the .jar even, when they where listed in the manifest file I used for creation.

I believe some things are not really worked out yet...

Good luck...
Reply With Quote

#8 Old 2004-03-09, 22:34

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
I can confirm everying that rlincke describes as "might" as being "definite". Check the documentation from the Wireless Toolkit for a full list, but the manifest must contain both microedition-configuration and microedition-profile. Where an attribute is required in both JAD and manifest, as rlincke says, it must have an identical value in both, for example, MIDlet-n.

Graham.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia