I am facing a very strange problem that my J2ME application .jar file is downloaded normally on the Nokia mobiles but on Samsung and Motorola it is not downloaded. But if i install the .jar without downloading on the Samsung or any other handset it worked. If some has any idea then guide. Link of my app is m.hellosunshine.in
Each Device has a specified amount of Heap Memory. A Heap Memory is a kind of RAM for Jar file to run. I Believe that your Samsung device doesn't have enough Heap Memory.
Most of the devices has 2MB Heap Memory for running Jar Files.
Nokia E-Series Phones allows unlimited Heap Memory, so you can easily execute your 1.5 MB Jar file in any E-Series mobile.
There is a utility called ProGuard. It allows your Jar file to compress in such a tiny format that you can run it easily. It will reduce your Jar file to 300-400KB and then you can easily run your application in Samsung Device too.
Your server is configured to reply with
Content-Type: text/plain
for the jar file (http://m.hellosunshine.in/J2ME/HelloSunShine.jar), but it should be configured to reply with
Content-Type: application/java-archive jar
See e.g. http://www.summet.com/blog/2007/11/04/mime-types-for-hosting-j2me-jar-and-jad-files/
It very simple they are 3 possibilities
Most Samsung do not support J2ME applications
For Samsung phones that support J2ME .. moths times to install an application it required both
.JAD
and.JAR
files .. on the phone .. Lunch the.jad
when both files are on the phone or your url must point to the.jad
file
A typical Content type looks like this
application/java-archive .jar
text/vnd.sun.j2me.app-descriptor .jad
- When you JAR file is higher than specified application memory it does not run
Thanks :)
Try to reduce the size of the jar file
also verify the content in jad file if all the details provided are correct
this problem not in jar but in code which direct it to download so in header of file add content signed and follow this link ( How to Force a file to download using PHP on mobile Browsers?)
Each Device has a specified amount of Heap Memory. A Heap Memory is a kind of RAM for Jar file to run. I Believe that your Samsung device doesn't have enough Heap Memory.
Most of the devices has 2MB Heap Memory for running Jar Files.
Nokia E-Series Phones allows unlimited Heap Memory, so you can easily execute your 1.5 MB Jar file in any E-Series mobile.
There is a utility called ProGuard. It allows your Jar file to compress in such a tiny format that you can run it easily. It will reduce your Jar file to 300-400KB and then you can easily run your application in Samsung Device too.
It's not jar problem, but server problem: your server is not configured to accept an unsigned jar file in case of samsung handset. Add some permissions in header of server page to download jar file on samsung set like:
Content-Type: application/java-archive jar.
© 2022 - 2024 — McMap. All rights reserved.