aspose file tools*
The moose likes Java Micro Edition and the fly likes Invalid Jar File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Invalid Jar File" Watch "Invalid Jar File" New topic
Author

Invalid Jar File

Brett Wiggins
Greenhorn

Joined: Mar 23, 2009
Posts: 19
Hi,

I am trying to use a third party api to create applications on my Nokia N95 8GB with j2me. I have sent the jar file to my phone using bluetooth but when I open
the file and the phone tries to install it I get the error message;

'Invalid Jar File'

I really don't know what this means. I have had a look at google and it seems alot of people have this problem but no-one really knows how to get around it. I even tried browsing to the website I downloaded it from on my phone and I had the same problem.

Thanks,

Brett.
Anuj Prashar
Ranch Hand

Joined: Apr 15, 2008
Posts: 99

Make sure the value of cldc and midp of jar file are compatible with your phone.
Regards,
Anuj


SCJP 5,SCWCD 5, RHCT
Brett Wiggins
Greenhorn

Joined: Mar 23, 2009
Posts: 19
Anuj Prashar wrote:Make sure the value of cldc and midp of jar file are compatible with your phone.


Hi Anuj, thanks for replying. This may sound stupid but how do I do that?
Anuj Prashar
Ranch Hand

Joined: Apr 15, 2008
Posts: 99

Nokia N95 (cldc 1.1 midp 2.0)

If there is a file with jad extension along with jar file you can check values in jad file by opening it in notepad

or if there is no jad file then you can un compress the jar file and you will find manifest.mf file inside meta-inf folder, you can check values from that file.

Regards,
Anuj
Brett Wiggins
Greenhorn

Joined: Mar 23, 2009
Posts: 19
ok thanks heaps.
Brett Wiggins
Greenhorn

Joined: Mar 23, 2009
Posts: 19
hey,

Still having a couple of problems installing the Jar file to my phone. There is no jad file so I edited MANIFEST.MF;



I am still getting the 'Invalid Jar File' message. Am I missing something else from the MANIFEST.MF file? Or is this a problem with the phone or API that I'm trying to use?

Thanks,

Brett.
Kamal Trivedi
Ranch Hand

Joined: May 22, 2006
Posts: 38
Hi,
If you are getting "Invalid Jar file" , it means CLDC & MIDP version does not support to phones CLDC & MIDP
In order to check phone's cldc & midp version use these link

http://devices.j2mepolish.org/interactivedb/searchdevices.faces

Generate the jar file that supports your phone & deploy in your phone.These might work.

Your JAD file should look like this



Kamal.B.Trivedi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invalid Jar File