Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 18
Registered: ‎08-24-2009
My Device: Not Specified

Invalid JAR: bad local file header

Hi all,

 

I develop applications for Blackberry devices and I always built the .cod, .jad, .alx and .jar. They work fine if I pass the application using the Desktop Manager. But I don't know why I can't download them by GPRS. My company has a GPRS server and we can download .jad and .jar files to other devices like nokia, sonyericsson, motorola, etc.

I tried using .jad and .cod file to download application and I get an error "Invalid COD: Unable to import ZIP file". I tried using just .jad and .jar and I get the error on the subject of this post "Invalid JAR: bad local file header". I tried this on at least 5 different applications and they all give me the same error.

I really need to use only the .jar and .jad file to install the application, because some of our clients only accepts these files. Is it possible to install an application only with .jar and .jad??

I already read this knowledge base article: 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800646/Support...

 

I couldn't find a solution there, and I checked all the topics.

I tried downloading the application on BlackBerry Bold 9000 with v4.6.0.116 (platform 4.0.0.158) and also tried on BlackBerry Curve 8520 v4.6.1.272 (platform 4.2.0.118). I tried building the application with JDE v4.6 and v4.0. None of this worked.

Can anyone help me with this problem?

Thanks in advance.

 

Vitor Franchi

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Invalid JAR: bad local file header

You need to use the JAD + CODs method. The COD file generated by the JDE needs to be unzipped and the unzipped (COD) files and the JAD file should be made available for download.

Highlighted
Developer
Posts: 18
Registered: ‎08-24-2009
My Device: Not Specified

Re: Invalid JAR: bad local file header

[ Edited ]

The problem is I really need to use only .JAR and .JAD. I tried with smaller applications and I managed to install them fine. The first one I tried, the .JAR had 3KB. The second one, it had 93KB. They both downloaded and intalled fine.

 

I tried what you said, unzipping the "master" .COD and placing all unzipped cods with the .JAD. It worked fine too. But I really need to manage doing this only with .JAR and .JAD. It is possible, isn't it?

 

Thanks

 

Update: I tried now with an application of 284KB and it worked fine too. It seems to have problems with applications bigger than 300KB. I'll continue to increase the size to find a maximum.