Can we run Java applications on iPhone? [closed]
Asked Answered
S

9

15

Can we run or develop apps for iPhone in Java?

Have a look to these links and answer:

  1. http://www.iphonefaq.org/archives/9731
  2. http://www.j2mepolish.org/cms/leftsection/documentation/platforms/iphone.html
  3. http://www.ibm.com/developerworks/opensource/library/os-eclipse-iphone/
Summand answered 28/7, 2009 at 11:34 Comment(1)
This is a duplicate of these questions: #618350 , #230179Spue
V
12

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.

Valiant answered 28/7, 2009 at 11:38 Comment(5)
Thank You @gizmo, Plz Have a look to the third link. There is no compiler!Summand
The third link is about developing iPhone web applications. That is, web sites which you access using MobileSafari.Injudicious
Might be a little off topic, but I can't help adding this remark: I wonder what is going to happen to Apple in, say, 2-3 years with Android rapidly gaining more and more ground ...Allergist
@TaSas and now four years later, Apple is still strong and android heavily fragmented.Groce
As you know, many Java applications are not purely Java apps (they can run as a jar or console app, war or ear, etc) and many larger apps combine probably a whole load of other external library or frameworks like Spring Boot or jQuery UI frameworks such as jqWidgets, EasyUI and then there could be encryptions, cryptography and file upload streams. Assuming that the PC/laptop can run such a Java web app after downloading the JDK, and other dependencies, can an Android or iOS phone run it on their default browsers ?Insupportable
O
11

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.

Orleans answered 28/7, 2009 at 11:57 Comment(5)
Please verify your statement with a citationPermissive
@IterAtor 9 years later you drop a drive by comment? Sure - infoworld.com/article/2651070/application-development/…Groce
Why does Apple 'hate' Java ? Wouldn't it be advantageous to their sales if they allowed Java on their devices?Insupportable
@Insupportable This answer is more than a decade old. At that time Apple - as far as I remember - was very strict on Apps not containing interpreted code, but only compiled. Probably something to do with static analysis of the binaries in the "can this go on the App store". Today things are very different.Groce
@ThorbjørnRavnAndersen thank you for answering! Yes I've done the necessary reading on this and understand now! Take care now and thank you once again !!!Insupportable
F
0

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.

Forint answered 28/7, 2009 at 11:40 Comment(1)
Thank You Thomas. Because You have extended it to web development.I have got experience in web dev for iPhone using JS.Summand
M
0

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

Miscarriage answered 28/7, 2009 at 11:47 Comment(2)
On the other hand, the iphone is pretty useless unless its jailbroken anyway ;-)Unstick
+1 for Birmstedt & +1 for Armocreations :-D I couldn't agree more...Allergist
D
0

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

Dejesus answered 28/7, 2009 at 13:3 Comment(0)
S
0

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.

Summand answered 29/7, 2009 at 4:6 Comment(0)
B
0

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

Bujumbura answered 23/9, 2010 at 8:16 Comment(0)
B
0

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!

Booby answered 11/7, 2011 at 17:41 Comment(0)
N
0

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

This compiles java to native.

Nidia answered 8/7, 2012 at 20:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.