Can we run Java applications on iPhone? [closed]

橙三吉。 提交于 2019-11-27 14:28:54
gizmo

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.

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.

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.

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).

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.

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

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

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!

Larry Gray

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

This compiles java to native.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!