Question

I have developed a J2ME application with J2ME Polish. Nokia now validate contents that will be submitted to the store, the challenge is that during validation of my JAR and JAD files, I get Error 217 - The JAR manifest does not end with a new line

I checked my JAR manifest and finds out that it is ending with a new line. Is anyone having any suggestions or solutions?

Was it helpful?

Solution

Double check that there are no invisible characters like whitespace or tab at the last line of the manifest.

If manifest has a newline indeed, error message apparently means a bug in this Nokia device.

Still, it is possible that your manifest has something wrong and that Nokia only used incorrect message to indicate some other problem in it. Getting messages like this, make sure that your manifest conforms to respective sections of JAR file Specification (available online), particularly:

First I'd check is that manifest lines do not exceed "72 bytes (not characters), in its UTF8-encoded form".

Another thing worth trying is to experiment with various styles of line endings of those specified: CR LF | LF | CR. In your IDE / build there could be a setting to manage that, look for something called like "DOS / Unix / Mac line breaks". Specification states that all these are OK, but you better account for a chance of bug in the device not being able to recognize particular style line breaks.

Also consider checking / asking at Nokia forums for this might be a known issue with particular device.

OTHER TIPS

Finally got this, i used the jar tool provided by the java sdk to extract the midlet from the jar file like this:

jar xf myjarfile.jar META-INF/MANIFEST.MF 

then edited the file in a text editor and updated the manifest in the jar file

jar umf META-INF/MANIFEST.MF myjarfile.jar

Thanks for suggestions guys.

optionally you can open your jar file using winrar software then you can access the manifest from the META - INI file.from this you can edit it using the text editor after which you can save CAUTION:after saving note that the size is going to change so make sure you check the size of the jar after you have edited , by right clicking then view properties.check the size then change it accordingly to jad file by opening your jad file in a text editor

thats it:-0

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top