是否可以将j2me应用程序更改为android应用程序?

发布于 2024-09-29 21:24:38 字数 80 浏览 1 评论 0原文

我使用 LWUIT 框架开发了基于 j2me 的应用程序。 是否可以将此应用程序更改为基于 Android 的应用程序? 或者我需要创建新项目吗?

I developed j2me based application with LWUIT framework.
Is it possible to change the this application to android based application?
Or can i need to create new project?

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

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

发布评论

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

评论(3

鯉魚旗 2024-10-06 21:24:38

你也许可以跨过你的部分代码,因为 android 仍然是 java,但我想说你将不得不重写大部分代码,甚至可能重写用户界面的所有代码。 J2ME 和 Android 的设计非常不同

You may be able to take parts of your code across as android is still java but I would say that you're going to have to rewrite most of it and probably all of the code for the user interface. J2ME and Android are designed very differently

小矜持 2024-10-06 21:24:38

您必须将代码从 J2ME 完全重写为 Android。我一直在寻找一种 J2ME->Android 的翻译器,但一无所获。最后,我现在正在将 J2ME 代码转换为 Android。 Android 的可能性比 J2ME 的精简 API 强大得多。所以您会发现您的新代码将比旧的 J2ME 代码更好。

不过,如果您只是在 Android 中启动 J2ME jar/jad - 理论上这是可能的,因为 KVM 只是普通 JVM 的子集(在 Android Dalvik VM 的情况下)。人们做出了一些努力将 KVM 字节码转换为 Dalvik 字节码。例如看这里

You have to completely rewrite your code from J2ME to Android. I was looking for a kind of translator from J2ME->Android but find nothing. In the end I'm now converting my J2ME codes into Android. Android possibilities are much more powerful than cut-down API's of J2ME. So you'll found that your new code will be nicer than elder J2ME code.

Though if you're going just launch J2ME jar/jad in Android - it's in theory possible, since KVM is just a subset of ordinary JVM (in case of Android Dalvik VM). There're some efforts to translate KVM byte-code into Dalvik's byte-codes. For instance look here

椵侞 2024-10-06 21:24:38

为此,我使用了 LWUIT 。他们为 android 平台创建了 LWUITActivity 类。

I have used LWUIT for this purpose. They created LWUITActivity class for android platform.

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