有没有办法在手机上查找java内存状态?

发布于 2024-12-20 23:30:02 字数 344 浏览 3 评论 0原文

我的 J2me 应用程序大小为 880KB。我必须在多部手机上运行这个 jar 文件。有些手机在单击 jar 文件时显示了下面给出的例外情况。

这些是

  1. Java 错误。内容大小太大。
  2. 项目不受支持。

据我所知,java内存和手机内存是不同的东西。因此,我们必须有足够的java内存空间来运行我的应用程序。

  1. 所以,请告诉我这个问题的原因,并让我知道是否 有什么方法可以找到JAVA的可用内存空间。
  2. 如何判断手机是否支持java?
  3. 我想知道880 Kb的jar文件是否是正常大小?

I have my J2me application that have 880KB size. I have to run this jar file in multiple phones. Some phones have shown the exceptions given below while clicking jar file.

These are

  1. Java Error. Content Size too Large.
  2. item not supported.

As far as I know, java memory and phone memory are different things. So, we must have sufficient java memory space to run my application.

  1. So, please tell me the reason to this problem and also let me know if
    there is any way to find Available memory space for JAVA.
  2. How to find if the phone is java enabled or not?
  3. I would like to know whether 880 Kb jar file is normal size or not?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ˉ厌 2024-12-27 23:30:02

处理此清单:

  1. 第一条错误消息,
  2. 第二条错误消息,可能您的意思是“无法下载不受支持的项目”,是由于 .jar 的 MIME 类型不正确而导致的Web 服务器中的 .jad 文件
  3. add these into your webserver's config: 
    
    AddType text/vnd.sun.j2me.app-descriptor jad 
    AddType application/java-archive jar 
    Hopefully that should cover mobile phone related binary package out there
    
  4. 减小
  5. 在此链接 响应帖子中的某处,您可以阅读
    • 我建议将大小限制为300k(对于 2G 网络)或 1Mb(对于 3G 网络),但这些不是严格的限制。,以及
    • WAPGateways 将 OTA 下载限制为低至 300k jarsize

Work on this checklist:

  1. The first error message,
    • As @bharath rightly pointed out 'Java Error. Content Size too Large.' is due to your jar size exceeding the device jar size limit and the reference link.
    • Some useful link for Samsung devices on this topic
  2. The second error message, probably you meant "item not supported cannot be downloaded", is due to incorrect MIME types for .jar and .jad files in the webserver
  3. add these into your webserver's config: 
    
    AddType text/vnd.sun.j2me.app-descriptor jad 
    AddType application/java-archive jar 
    Hopefully that should cover mobile phone related binary package out there
    
  4. Reduce jar size
  5. At this link somewhere in the response posts you can read
    • I recommend limiting the size to 300k (for 2G networks) or 1Mb (for 3G networks), but these are not strict limits., and
    • WAPGateways put a limit of as low as 300k jarsize for OTA downloads thu them
杀手六號 2024-12-27 23:30:02

通常,S40 手机允许手机上的 JAR 文件大小有限。该手机仅允许 166KB 到 2 MB。此外,移动设备的堆内存有限(最大 4 MB,基于 S40 版本)。如果 JAR 文件大小超过,您将收到类似 Java Error 的错误警告。内容大小太大。

如果您想查找支持 java 的手机列表,您必须手动查找(对于诺基亚 请参阅此规范)

还有一种查找移动信息的替代方法。即使用 WURFL。 当用户从 WAP 浏览器下载 JAR 文件时,您可以在服务器端获取移动信息。

Normally S40 mobiles are allowing limited size of JAR file on the mobiles. That mobiles allowing only 166KB to 2 MB. Also that mobiles having limited heap memory (Max 4 MB, Based on S40 version). If JAR file size exceed, you will get the error warning like Java Error. Content Size too Large.

If you want to find java enabled mobiles list, you have to find manually(For nokia see this specification).

There is one alternate way to find mobile information's. That is use WURFL. You can get the mobile information's on server side when user download the JAR file from WAP browser.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文