开发者

Java on iPhone 4 [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Can we run Java applictions on iPhone?

im not sure this is the place for asking this but ill give it a go anyway.

i recently downloaded MobileTerminal on my iPhone 4.3.3 and it got me thinking. iOS is basically a pretty version of linux.

what if i was to download the Java Binary files to my iphone and set the path enviroment to point to it? will开发者_StackOverflow i have java capabillities this way on my iphone? or will there something else that wont let me compile java?

i wanted to run this issue past here maybe someonw has any experience with it before i start messing around with my phone.

thanks :)


You'll need a Java runtime for iOS, which as far as I know, doesn't exist.


It is against the App Store rules to run a JVM on an iPhone (no interpreted code). Therefore you cannot run Java programs on an iPhone.

The best bet to do so is to use MonoTouch (commercial software) which allow you to develop in .NET and deploy to an iPhone.


For the sake of an actual answer: if your phone is jailbroken, go read here:

http://geeknizer.com/how-to-install-compile-run-java-apps-on-iphone/

You can certainly run Java on iOS...but you're going to need to be jailbroken to do it.

If you don't want to or can't jailbreak, you're out of luck.


The Java binaries would need to work with iOS, especially the iOS UI to be useful. So it would only work with the standard Java Binaries in a limited capacity. There may be projects out there trying to accomplish this, but there is not a full port of Java UI concepts at this time from what I know.

FYI JamVM seems to be one of the Java virtual machines that the Cydia guys have packaged. http://iphoneroot.com/tutorial-install-java-on-the-iphone/


Assuming you haven't jailbroken your phone, you can't run Java on it. If you have jailbroken it, take a look at http://iphoneroot.com/tutorial-install-java-on-the-iphone/.


Running Java on your iDevice is soooo much more complicated than it may initially seem. True, iOS is simply a different UI on top of the OS X operating system. However, it's compiled for a completely different instruction set with likely a number of changes made due to the hardware requirements. So, for starters, getting the JVM binaries running on your iDevice would be nontrivial (would require you to recompile them for the appropriate processor) and would require significant modification to the UI components to work with the screen resolution and drawing paradigms of iOS.

In short, this is a much more complicated process than it seems. Let me put it this way, you'd have a much easier time writing a compiler that translates Java bytecode to native iOS code than you would trying to get a JVM up and running on it....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜