我们可以在 iPhone 上运行 Java 应用程序吗?

发布于 2024-07-30 06:45:08 字数 1436 浏览 3 评论 0原文

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

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

发布评论

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

评论(9

清风夜微凉 2024-08-06 06:45:08

目前,iPhone 上没有运行 JVM。 这意味着您使用 Java 为 iPhone 开发应用程序的唯一方法是拥有一个编译器,将您的 java 代码编译为 Objective-C 代码。

有几种解决方案可以做到这一点:

Codename One - 专注于使用 Java 以及可视化工具和模拟器构建应用程序。 具有 SaaS 后端的开源,无需 Mac。

XMLVM - 将 Java 字节码转换为 C/Objective-C 的转换器。 开源,但目前需要编写 iOS 特定代码。

还有一些专有的解决方案,但我没有使用它们的经验。 例如,Software AG 有一个称为 Web 对象的工具。

Currently, there is no JVM running on the iPhone. This means that the only way you have to develop apps for iPhone in Java is to have a compiler that will compile your java code down to Objective-C code.

There are several solutions that do exactly that:

Codename One - focuses on building applications using Java with visual tools and simulators. Open source with a SaaS backend that removes the need for a Mac.

XMLVM - a translator to convert Java bytecode to C/Objective-C. Open source, but requires writing iOS specific code at the moment.

There are also several proprietary solutions but I have no experience with them. E.g. Software AG has a tool called web objects.

箹锭⒈辈孓 2024-08-06 06:45:08

Sun 发现他们可以将 Java 移植到 iPhone,但 SDK 许可证禁止这样做。 所以这不是一个技术问题,而是一个政治问题。

Sun found they could port Java to the iPhone, but the SDK license prohibits it. So this is not a technical but a political issue.

盛夏尉蓝 2024-08-06 06:45:08

我想说:不,

如果你想创建“真正的”本机 iPhone 应用程序,你必须使用 Objective C 和 iPhone SDK

还有其他方法,例如 http://phonegap.com/ 但我个人没有这个项目的经验。

I would say: No

If you want to create "real" native iPhone applications you will have to go with Objective C and the iPhone SDK

There are other ways like http://phonegap.com/ but I personally have no experience with this project.

绾颜 2024-08-06 06:45:08

Webapp当然可以用Java开发,但是你不能在Iphone上运行Java应用程序(虚拟机在设备上没有被授权)。

Java 到 Objective-C 的转换需要付出一些努力,例如 XMLVM(查看 Google TechTalk 视频)。

Webapp can be developed in Java of course, but you're not allowed to run Java applications ON the Iphone (VMs are not authorized on the device).

There is some effort in Java to objective-c conversion, as with XMLVM (check the Google TechTalk video).

情栀口红 2024-08-06 06:45:08

最后我可以得出的结论是,可以使用 Java 轻松开发 iPhone Web 应用程序。
要使用 Java 为 iPhone 开发本机应用程序,可以使用 alcheMoXMLVM 进行一些工作。我没有 alcheMo的经验XMLVM 但肯定很期待它。

谢谢你们。

At the end what I can conclude is that one can develop iPhone web apps easily with Java.
For developing native apps for iPhone in Java one may use alcheMo or XMLVM with a little working.I have no experience in alcheMo or XMLVM but surely looking forward to it.

Thank You All.

人间☆小暴躁 2024-08-06 06:45:08

有一个名为“Classpath”的java虚拟机的实现,但缺点是你可能只能使用Cydia/Installer来获取它。

这意味着,您需要越狱您的 iPhone 才能安装 JVM。

GUI 可以像 AWT-Gui 一样设计。

一般来说:没有解决方案(苹果不允许应用程序在其设备上运行其他应用程序)

如果您不介意破解您的应用程序部署到的设备:是的,不应该有大问题。 有大量的教程如何破解您的 iPhone,如果您有兴趣...

编辑: 有一个问题! 如果您没有每个 iPhone 版 Java-GUI-App 都在寻找的文件 libuicaboodle,您将无法运行该应用程序。 还有人还留着这个文件吗? 再也找不到它了:o(

问候

there is an implementation of a java virtual machine called "Classpath", but the drawback is that you may only get it using Cydia/Installer.

Means, you need to jailbreak your iphone in order to be able to install the JVM.

the gui can be designed like an AWT-Gui.

in general: no solution (apple does not allow applications that run other applications on their devices)

if you don't mind hacking the devices your application is deployed to: yes, there shouldn't be a big problem. there is a large amount of tutorials how to hack your iphone, if you're interested...

EDIT: there is a problem! If you don't have the file libuicaboodle every Java-GUI-App for iPhone is looking for, you won't be able to run the app. Is there anybode who still has this file? Can't find it anywhere anymore :o(

regards

半世晨晓 2024-08-06 06:45:08

一种有趣的方法是将 Google Web Toolkit 与 Appcelerator Titanium 结合起来,使用 Java 开发 iPhone 应用程序。

Google Web Toolkit (GWT) 允许将 Java 代码编译为 Javascript,而 Titanium 允许使用 Javascript 创建看起来原生的 iPhone 应用程序。 我启动了一个名为“gwt-titanium”的项目来将两者结合起来,你可以找到解释有关该项目和构建说明的信息,请访问博客 iPhoneJava.org

祝你好运!

An interesting approach is combining the Google Web Toolkit with Appcelerator Titanium for developing iPhone applications using Java.

Google Web Toolkit (GWT) allows compilation of Java code into Javascript, while Titanium allows creation of native-looking iPhone applications in Javascript. I have started a project called "gwt-titanium" to combine the two, you can find an explanation about the project and building instructions on the blog at iPhoneJava.org.

Good luck!

怎会甘心 2024-08-06 06:45:08

有几种方法可以用 java 编写 iphone 应用程序
通过使用 xmlvm 转换器到 Objective C,但这很困难,但它是完成您的应用程序的合适且兼容的方式,您需要学习 xml 语言

there is several ways to write an iphone application on java
by using xmlvm converter to objective c but is hard but it is the suitable and the compatible way to do ur application u need to learn xml language

世俗缘 2024-08-06 06:45:08

其他 Java 到本机编译器怎么样?我认为有一个名为 Jet 的编译器?

这会将 java 编译为本机。

What about other Java to native compilers I though there was one calledJet?

This compiles java to native.

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