LWUIT - 在主题中使用数据导致 java.lang.OutOfMemoryError

发布于 2024-12-17 11:57:29 字数 314 浏览 2 评论 0原文

我正在使用 LWUIT 1.5 制作我自己的主题以应用于我的 J2ME 应用程序。当我从 LWUIT 资源编辑器的“数据”选项卡将数据添加到主题时,我发现了一个问题。这些数据文件是 .csv 文件。

当我运行我的应用程序时,它在 Eclipse 控制台中显示 java.lang.OutOfMemoryError 并且它无法启动。

我发现其中几个数据文件导致了此问题,因为它们的大小超过 100.000 字节。这是否意味着我需要使用更小的数据?这是否意味着该资源存在最大大小?

有什么想法吗?

谢谢

I'm working with LWUIT 1.5 to make my own theme to apply to my J2ME application. I've found a problem when I've added datas to my theme from Data tab in LWUIT Resource Editor. Those data files are .csv files.

When I run my application, It show me java.lang.OutOfMemoryError in my Eclipse console and it doesn't start.

I've found that several of this data files are causing this problem because their sizes are more than 100.000 bytes. Does it means that I need to use data more small? Does it means that exist a maximum size to that resources?

Any ideas?

Thank you

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

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

发布评论

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

评论(1

蓝色星空 2024-12-24 11:57:29

基本上 OutOfMemoryError 发生在 S40 手机上。因为它们只有 1 到 2 MB 大小的堆内存。他们无法在运行时扩展内存。因此,当它存在时,将抛出 OutOfMemoryError 异常。所以更好的主意是,如果您处理巨大的文件,只需将其存储在服务器中并从服务器读取即可。为此,请使用 Web 服务。看看这些文章,然后您可以更好地了解如何处理,

Basically OutOfMemoryError occurs on S40 mobiles. Because they have only heap memory 1 to 2 MB size. They can't extended their memory on run time. So when its exist, OutOfMemoryError exception will be throw. So better idea, If you handle huge size of files, just store it in server and read from server. Use web service for this. Look on these articles, then you can get better idea about how to handle,

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